anchor.diff:  %%%===================================================================
   
   start_workers(Pool, Env, NumNodes, Offset, #s{} = State) ->
  -    #operation{name = pool, args = [PoolOpts, Script], meta = Meta} = Pool,
  +    WorkersNumFun = fun () -> eval_worker_number(Pool, Env, NumNodes, Offset) end,
  +    {Script, WorkerNumber, StartDelay} = WorkersNumFun(),
  +    #operation{name = pool, args = [PoolOpts|_], meta = Meta} = Pool,
  +    Name = proplists:get_value(pool_name, Meta),
  +
  +    Worker = mzbl_script:extract_worker(PoolOpts),
  +
  +    load_worker(Worker),
  +
  +    Self = self(),
  +    Node = node(),
  +    WorkerStartFun = fun (WNum, StartingFrom) ->
  +        Numbers = lists:seq(0, WNum - 1),
  +        system_log:info("Worker offsets: ~p", [Numbers]),
  +        StartTime = msnow(),
  +        lists:foreach(fun(N) ->
  +                        worker_start_delay(StartDelay, NumNodes, N, StartTime),
  +                        WId = (StartingFrom + N) * NumNodes + Offset,
  +                        WorkerScript = mzbl_ast:add_meta(Script, [{worker_id, WId}]),
  +                        gen_server:cast(Self, {start_worker, WorkerScript, Env, Worker, Node, WId })
  +                    end, Numbers)
  +    end,
  +
  +    WorkerStarter =
  +        erlang:spawn_monitor(fun () -> WorkerStartFun(WorkerNumber, 0) end),
  +
  +    restart_pollvars_timer(
  +        State#s{name = Name,
  +                worker_starter = WorkerStarter,
  +                current_pool_size = WorkerNumber,
  +                worker_starter_fun = WorkerStartFun,
  +                workers_num_fun = WorkersNumFun}).
  +
  +restart_pollvars_timer(#s{poll_vars_timer = OldTimer} = State) ->
  +    _ = (catch erlang:cancel_timer(OldTimer)),
  +    PollVarsTimer = erlang:send_after(?POLLVARS_INTERVAL_MS, self(), poll_vars),
  +    State#s{poll_vars_timer = PollVarsTimer}.
  +
  +eval_worker_number(Pool, Env, NumNodes, Offset) ->
  +    #operation{name = pool, args = [PoolOpts, Script]} = Pool,
       Eval = fun (E) -> mzbl_interpreter:eval_std(E, Env) end,
  -    Name = proplists:get_value(pool_name, Meta),
       [Size] = Eval(mzbl_ast:find_operation_and_extract_args(size, PoolOpts, [undefined])),
       [PerNode] = Eval(mzbl_ast:find_operation_and_extract_args(per_node, PoolOpts, [undefined])),
       StartDelay = case mzbl_ast:find_operation_and_extract_args(worker_start, PoolOpts, [undefined]) of
  
positive.code:             end,
      system_log:info("Size, PerNode, Size2, Offset, NumNodes: ~p, ~p, ~p, ~p, ~p",
          [Size, PerNode, Size2, Offset, NumNodes]),
      Worker = mzbl_script:extract_worker(PoolOpts),
      Self = self(),
  
      load_worker(Worker),
  
      Numbers = lists:seq(0, mzb_utility:int_ceil((Size2 - Offset + 1)/NumNodes) - 1),
      system_log:info("Worker offsets: ~p", [Numbers]),
  
      WorkerStarter =
          erlang:spawn_monitor(fun () ->
              Node = node(),
              StartTime = msnow(),
              lists:foreach(fun(N) ->
                              worker_start_delay(StartDelay, NumNodes, N, StartTime),
                              WId = N * NumNodes + Offset,
                              WorkerScript = mzbl_ast:add_meta(Script, [{worker_id, WId}, {pool_size, Size2}]),
                              gen_server:cast(Self, {start_worker, WorkerScript, Env, Worker, Node, WId, Size2})
                          end, Numbers)
          end),
      State#s{name = Name, worker_starter = WorkerStarter}.
  
  load_worker({WorkerProvider, Worker}) ->
      case erlang:apply(WorkerProvider, load, [Worker]) of
  
negative.code:     system_log:error("Unhandled call: ~p", [Req]),
      {stop, {unhandled_call, Req}, State}.
  
  handle_cast({start_worker, WorkerScript, Env, Worker, Node, WId}, #s{workers = Tid, name = PoolName} = State) ->
      Self = self(),
      {P, Ref} = erlang:spawn_monitor(fun() ->
              mzb_worker_runner:run_worker_script(WorkerScript, Env, Worker, Self, PoolName)
          end),
      ets:insert(Tid, {P, Ref}),
      if
          WId < 4 -> system_log:info("Starting worker on ~p no ~p", [Node, WId]);
          WId =:= 4 -> system_log:info("Starting remaining workers...", []);
          true -> ok
      end,
  