anchor.diff:      end.
   
   shutdown(Peer,S) ->
  +    lists:map(fun(W) -> W ! {'STOP'} end, S#ej.workers),
  +    shutdown_peer(Peer).
  +
  +shutdown_peer(Peer) ->
       send_peer(Peer, Ref=get_ref(), ?TAG_NODE, [?EJMSGPART(call,shutdown)]),
  -    lists:map(fun(W) -> W ! {'STOP'} end, S#ej.workers),
       receive
           {Peer,Ref,{?TAG_OK,[?EJMSGPART(call,bye)]}} -> 
               log:info(self(), "shutdown confirmed by peer", []),
  
positive.code:     {ok,S1}.
  
  % @hidden     
  handle_call({job,Spec},From,S) ->
      {W, L} = f:lrot(S#ej.workers),
      gen_server:cast(W,{job,From,Spec}),
      {noreply, S#ej{workers=L}};
  handle_call({send,Ref,Tag,Msg},From,S) ->
      {W, L} = f:lrot(S#ej.workers),
      gen_server:cast(W,{send,From,Ref,Tag,Msg}),
  
negative.code: -behaviour(gen_server).
  
  % public interface
  -export([send/2, call/2, call/3, ping/0, restart_peer/0]).
  -export([start/0, start/1, start/2, start_link/0, start_link/1, start_link/2, stop/0]).
  
  % gen_server exports
  