We were decrementing activeJobCount after removing the job from the queue, which could cause other threads in the pool to preempt us before the decrement, causing them to spin forever trying to get a non-existant job, until the decrement actually happened. Now we always decrement first and fix-up the count if we couldn't get a job from the queues. The race is inverted, and doesn't cause threads to spin a long time.