anchor.diff:      lists:foreach(fun ibrowse_http_client:stop/1, State#state.free),
       lists:foreach(fun ibrowse_http_client:stop/1, State#state.busy).
   
  -monitor_client(Tab, Worker, {ClientPid, _}) ->
  -    ets:insert(Tab, {Worker, erlang:monitor(process, ClientPid)}).
  +monitor_client(Callers, Worker, {ClientPid, _}) ->
  +    [{Worker, erlang:monitor(process, ClientPid)} | Callers].
   
  -demonitor_client(Tab, Worker) ->
  -    case ets:lookup(Tab, Worker) of
  -    [] -> ok;
  -    [{Worker, MonRef}] ->
  -        ets:delete(Tab, Worker),
  -        erlang:demonitor(MonRef, [flush])
  +demonitor_client(Callers, Worker) ->
  +    case lists:keysearch(Worker, 1, Callers) of
  +        {value, {Worker, MonRef}} ->
  +            erlang:demonitor(MonRef, [flush]),
  +            lists:keydelete(Worker, 1, Callers);
  +        false ->
  +            Callers
       end.
  
positive.code: 
  handle_cast({release_worker, Worker}, State) ->
      #state{waiting = Waiting, callers = Callers} = State,
      demonitor_client(Callers, Worker),
      case is_process_alive(Worker) andalso
          lists:member(Worker, State#state.busy) of
      true ->
          case queue:out(Waiting) of
          {empty, Waiting2} ->
              Busy2 = State#state.busy -- [Worker],
              Free2 = [Worker | State#state.free];
          {{value, From}, Waiting2} ->
              monitor_client(Callers, Worker, From),
              gen_server:reply(From, {ok, Worker}),
              Busy2 = State#state.busy,
              Free2 = State#state.free
  
negative.code:     limit,                  % max # of workers allowed
      free = [],              % free workers (connections)
      busy = [],              % busy workers (connections)
      waiting = queue:new(),  % blocked clients waiting for a worker
      callers = []            % clients who've been given a worker
  }).
  
  
  