celluloid/celluloid — pull request #121 by halorgium (2013-10-06 09:32:47+00:00)
Title: Problems trapping signals: deadlock on 1.9, impossible on 2.0

I'll try take a look at this tomorrow if I get time.

`ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin12.2.1]`
`Celluloid 0.12.3`

```ruby
class Foo
include Celluloid

def bar
sleep 0.1
end
end

pool = Foo.pool(size: 2)
Signal.trap :HUP, Proc.new { puts pool.size }
puts Process.pid
200.times { pool.async.bar }
```

In another terminal, spam the process with a bunch of HUPs. After ~10 seconds the puts will print, followed by the process exiting (as if I wasn't trapping the signal ???) followed by a deadlock trace.

The deadlock itself is perhaps not so weird, what is weird is that the HUPs appear to cause the process to exit. If you change the HUP block to do something non-celluloid related, then it behaves as expected.

Output: https://gist.github.com/4102620