anchor.diff:      {ok, St}.
   
   %% internal functions
  +
  +start_changes_listener(SinceSeq) ->
  +    Self = self(),
  +    {Pid, _} = erlang:spawn_monitor(fun() ->
  +        erlang:spawn_link(fun() ->
  +            Ref = erlang:monitor(process, Self),
  +            receive
  +                {'DOWN', Ref, _, _, _} ->
  +                    ok
  +            end,
  +            exit(shutdown)
  +        end),
  +        listen_for_changes(SinceSeq)
  +    end),
  +    Pid.
   
   fold_fun(#full_doc_info{}=FDI, _, Acc) ->
       DI = couch_doc:to_doc_info(FDI),
  
positive.code:     ets:new(?ATIMES, [ordered_set, protected, named_table]),
      ok = config:listen_for_changes(?MODULE, nil),
      SizeList = config:get("mem3", "shard_cache_size", "25000"),
      {Pid, _} = spawn_monitor(fun() -> listen_for_changes(get_update_seq()) end),
      {ok, #st{
          max_size = list_to_integer(SizeList),
          cur_size = 0,
          changes_pid = Pid
      }}.
  
  handle_call({set_max_size, Size}, _From, St) ->
  
negative.code: -record(st, {
      max_size = 25000,
      cur_size = 0,
      changes_pid,
      update_seq
  }).
  
  -include_lib("mem3/include/mem3.hrl").
  