This was because of a data race in the line @result ||= Result.new. Results are now generated early, and not lazy as before.
Children would write an answer that would then not be consumed. More defensive code and less offensive language. (Child death is a horrible concept to drag around in code, even as an abstraction.)
and detecting a few in the process..
I know this is a bad bad busy loop. But I also know that the threading primitives Ruby includes fail me once again at this point.
This eliminates the need for tuning towards the system you run on. You should normally just use procrastinate/implicit and not worry about anything.
I will try to track down the 1.9 bug.
It seems that ConditionVariables and traps have a bad interaction where the trap will wait for a mutex before executing, thereby blocking all processes.
When the child process dies this exception will notify everyone waiting on a result.
This still hangs when all debug statements are gone...