> you'd likely need to increment workID count when submitting a task and not 
> after checking tryRecv

For anyone else reading this, we're talking past each other here I suspect, 
because the code does do the right thing once an `initLock` is added. What 
happens for submission is it only submits jobs to threads that are ready for 
jobs - thus the check for receiving a "Ready" message through `tryRecv` and why 
`workID` is only incremented upon a job submission after receiving a response 
from the thread, which is the "ready for work" message. With `initLock`, 
results at the end are deterministic and all is good. Yay!

Reply via email to