anchor.diff:  -define(MAX_QUEUE, 20).
   
   -record(s, {
  -    cache :: gb_tree()
  +    cache :: gb_tree(),
  +    pids :: gb_tree()
     }).
   
   -include("seto_piqi.hrl").
  
positive.code: %% ------------------------------------------------------------------
  
  init([]) ->
    {ok, #s{cache=gb_trees:empty()}}.
  
  handle_call({log_out, ClientName, Payload}, _From, State) ->
    {reply, ok, do_log(ClientName, Payload, State)};
  
negative.code: handle_call({map_from, ClientName, Seq, Fun}, _From, #s{cache=Cache} = State) ->
    {reply, do_map_from(ClientName, Seq, Fun, Cache), State};
  
  handle_call({takeover_session, ClientName, Session, Pid}, _From, State) ->
    #s{
      cache = Cache,
      pids = Pids
    } = State,
    erlang:monitor(process, Pid),
    {_,T,In,Out,Q} = gb_trees:get(ClientName, Cache),
    {reply, ok, State#s{
        cache = gb_trees:update(ClientName, {Session,T,In,Out,Q}, Cache),
        pids = gb_trees:insert(Pid, ClientName, Pids)
      }};
  
  handle_call({session_state, ClientName}, _From, #s{cache=Cache} = State) ->
  