Currently zjobs will stall a thread if it hit a job that is blocked by a in-flight job.
If we had some sort of coroutines support then we could simply yield in that case and enqueue the job again. The thread could then try to pick up another job. If the same stalled job is picked up twice while remaining stalled then threads can sleep and let the thread that is currently working on the job that is blocking grab the stalled job once it is done.
Currently zjobs will stall a thread if it hit a job that is blocked by a in-flight job.
If we had some sort of coroutines support then we could simply yield in that case and enqueue the job again. The thread could then try to pick up another job. If the same stalled job is picked up twice while remaining stalled then threads can sleep and let the thread that is currently working on the job that is blocking grab the stalled job once it is done.