Seems like there is a race between `candidates` and `jobScheduled` function. (I assume the scheduling can be parallel, I am not exact sure about the workflow)
We are copying the machineSpec first with the lock. Then we release the lock and use the copied one as our correct view.
However, in the meantime if `jobScheduled` is called, the view will not be correct anymore. We might overload a machine. 

To solve this we can do pre-allocation or check the load again with the lock when calling `jobSchedule`.