anchor.diff:      Ref = make_ref(),
       Pid ! {list_bucket, Bucket, self(), Ref},
       receive {list_bucket_response, Result, Ref} -> Result end.
  +
  +is_empty(#state { pid=Pid }) ->
  +    Ref = make_ref(),
  +    Pid ! {is_empty, self(), Ref},
  +    receive {is_empty_response, Result, Ref} -> Result end.
  +
  +fold(#state{ pid=Pid }, Fun0, Acc) ->
  +    Ref = make_ref(),
  +    Pid ! {fold, Fun0, Acc, self(), Ref},
  +    receive {fold_response, Result, Ref} -> Result end.
  +
  +drop(#state{ pid=Pid }) ->
  +    Ref = make_ref(),
  +    Pid ! {drop, self(), Ref},
  +    receive {drop_response, Result, Ref} -> Result end.
       
   tree_loop(Tree) ->
       receive
  
positive.code: -module(riak_gb_trees_backend).
  
  -include_lib("eunit/include/eunit.hrl").
  -export([start/2, stop/1,get/2,put/3,list/1,list_bucket/2,delete/2]).
  
  % @type state() = term().
  -record(state, {pid}).
  
negative.code:                    srv_list_bucket(Tree, Bucket), Ref},
              tree_loop(Tree);
  
          {is_empty, Pid, Ref} ->
              Pid ! {is_empty_response, gb_trees:is_empty(Tree), Ref},
              tree_loop(Tree);
  
          {drop, Pid, Ref} ->
              Pid ! {drop_response, ok, Ref},
              tree_loop(gb_trees:empty());
  
          {fold, Fun0, Acc, Pid, Ref} ->
              Pid ! {fold_response,
                     srv_fold(Tree, Fun0, Acc), Ref},
              tree_loop(Tree);
  
          {stop, Pid, Ref} ->
              Pid ! {stop_response, ok, Ref}
      end.
  