Open jhoblitt opened 10 years ago
Celluloid provides its own sleep that interacts with its internal timer system.
That said, this is the likely culprit:
Well that's a bummer but a bit of relief. I've been having flash backs of debugging pthreads + signals for the last 4 hours.
It's something we'd like to get fixed really soon but requires some changes to the design of the Mailbox API which is why it's still not fixed.
@halorgium we should get this fixed really soon now! :soon:
As a disclaimer, I've never worked with celluloid/celluloid-io before today but I can't find any mention of sleep being considered unsafe inside of an actor. Everything was going well with my experiments until I started encountering strange deadlocks. I managed to reduced the problem down to this minimal test case which seems to show some sort of odd interaction between sleep/timers running in the same method as a redis method invocation, but only if the redis method is called before the sleep.
The output I get is:
If I comment out the line
require 'redis/connection/celluloid'
, so that redis uses it's default connection driver, the script exits normally with the expected output.