Instantiating ScopedBlockingCalls on a SchedulerWorkerPoolImpl thread can create too many workers.
We may create extra workers in this case: |workers.size()| was equal to
the old |worker_capacity_|, we had multiple ScopedBlockingCalls in
parallel and we had work on the PQ.
Suppose there was exactly one Sequence on the PQ. It's possbile one
ScopedBlockingCall creates a worker, but before that worker picks the
work off the PQ, another ScopedBlockingCall occurs, sees there's work on
the PQ, and creates its own worker. Here, we ended up creating two
workers to deal with one task.
Instead, only one worker should've been created.
Comment 1 by jeffreyhe@google.com
, Aug 22 2017