opened 02:43AM - 06 May 21 UTC
Two problems:
1. Possible race conditions. @tkf suggested a good fix here, whicā¦h is to have a "job started" stated. Then, if the job hasn't started, `ThreadingUtilitilies.wait` can steal the task back (note that the overhead on this will be much higher than that of a proper work stealing implementation, which would use jumps).
2. ThreadingUtilities' tasks currently still spend some time before going to sleep. This gets in the way of `Threads.@spawn` and `Threads.@threads`, causing bad performance. It'd be great if there were something they could check to go to sleep immediately if someone used `Thread.@spawn` or `Threads.@threads`.