anchor.diff:          end,
       {ok, Target} = couch_api_wrap:db_open(TgtDB, []),
   
  -    {ok, ChangesQueue} = couch_work_queue:new([
  -                                               {max_items, BatchSizeItems * NumWorkers * 2},
  -                                               {max_size, 100 * 1024 * NumWorkers}
  -                                              ]),
  +    {ok, ChangesQueue} = start_via_exit_eater(
  +                           fun () ->
  +                                   couch_work_queue:new([
  +                                                         {max_items, BatchSizeItems * NumWorkers * 2},
  +                                                         {max_size, 100 * 1024 * NumWorkers}
  +                                                        ])
  +                           end),
       %% This starts the _changes reader process. It adds the changes from
       %% the source db to the ChangesQueue.
       SupportsDatatype =
  
positive.code:     Workers = lists:map(
                  fun(WorkerID) ->
                          WorkerOption2 = WorkerOption#rep_worker_option{worker_id = WorkerID},
                          {ok, WorkerPid} = xdc_vbucket_rep_worker:start_link(WorkerOption2),
                          WorkerPid
                  end,
                  lists:seq(1, NumWorkers)),
  
  
negative.code:     erlang:put(changes_reader, ChangesReader),
      %% Changes manager - responsible for dequeing batches from the changes queue
      %% and deliver them to the worker processes.
      Self = self(),
      ChangesManager = start_via_exit_eater(
                         fun () ->
                                 spawn_changes_manager(Self, ChangesQueue, BatchSizeItems)
                         end),
      %% This starts the worker processes. They ask the changes queue manager for a
      %% a batch of _changes rows to process -> check which revs are missing in the
      %% target, and for the missing ones, it copies them from the source to the target.
  