Open Burgestrand opened 10 years ago
Is this still an issue @Burgestrand?
I would assume so, but I will not be at a computer for another 24 hours to test the reproduction case against the newest release of celluloid.
The origin of the bug is based on that the non-blocking read in Celluloid::IO will never yield to the event loop because there is always data to be read from the socket, and because of this it will never receive the mailbox termination message, or any other message for that part. sleep(0)
is a relatively sane workaround to yield to the event loop before reading from the socket, but I'm not sure I think it should be necessary.
I ran your reproduction and I see your issue. This is still affecting jruby-1.7.19
@Burgestrand thank you for getting back to me on this, and for the beautiful repro... long ago.
/cc @jnicklas
Here’s a gist of a reproduction case: https://gist.github.com/Burgestrand/7421e529fd92a4889afd
Some caveats about the code in the gist. I tried it on:
For celluloid / celluloid io versions:
With the following results:
kill -9
, so probably Celluloid.shutdown not working properly here either.Version of celluloid does not change the results, except 0.15.x will whine more in the log about terminated tasks.