anchor.diff:  
   -record(state, {
           queue = queue:new(),
  -        pool :: pid()
  -        %remaining = 0 :: non_neg_integer()
  +        pool :: pid(),
  +        monitors = [] :: list()
       }).
   
   start_link(WorkerMod, PoolSize, VNodeIndex, WorkerArgs, WorkerProps) ->
  
positive.code: handle_sync_event(_Event, _From, StateName, State) ->
      {reply, {error, unknown_message}, StateName, State}.
  
  handle_info(checkin, _, #state{pool = Pool, queue=Q} = State) ->
      %io:format("checkin -- switching back to ready~n"),
      case queue:out(Q) of
          {{value, {work, Work, From}}, Rem} ->
              case poolboy:checkout(Pool) of
                  full ->
                      {next_state, queueing, State#state{queue=Q}};
                  Pid when is_pid(Pid) ->
                      %io:format("offloading work to worker ~p~n", [Pid]),
                      ok = riak_core_vnode_worker:handle_work(Pid, Pool, Work, From),
                      {next_state, queueing, State#state{queue=Rem}}
              end;
          {empty, Empty} ->
              {next_state, ready, State#state{queue=Empty}}
      end;
  handle_info(_Info, StateName, State) ->
      {next_state, StateName, State}.
  
negative.code: 
  code_change(_OldVsn, StateName, State, _Extra) ->
      {ok, StateName, State}.
  
  %% Keep track of which worker we pair with what work/from and monitor the
  %% worker. Dead workers are removed from the list but successful ones aren't,
  %% the data in the list is just updated when the worker is reused.
  %% This should be fine because the worker shouldn't crash while not in use.
  monitor_worker(Worker, From, Work, Monitors) ->
      case lists:keyfind(Worker, 1, Monitors) of
          {Worker, Ref, _OldFrom, _OldWork} ->
              %% reuse old monitor and just update the from & work
              lists:keyreplace(Worker, 1, Monitors, {Worker, Ref, From, Work});
          false ->
              Ref = erlang:monitor(process, Worker),
              [{Worker, Ref, From, Work} | Monitors]
      end.
  