celluloid/celluloid — pull request #245 by halorgium (2013-05-10 12:48:11+00:00)
Title: Invalidate the block on call completion

When calling a method on an `Actor` from a normal `Thread`, if you invoke a block after the `Call` has completed, you will encounter a deadlock.

This is due to the fact the sending `Thread` is no longer waiting for the block invocations.
[gist](https://gist.github.com/halorgium/5554085/ffd1a4b4f57394d0514f486517e2a4646e66f273)

If you are calling from an Actor, this behaviour works.
[gist](https://gist.github.com/halorgium/5554085/db96cf50b7f120b22c03437d53e6d7434d1824f0)

This change invalidates the block for both scenarios.
We can allow block invocations in the actor case by only invalidating if the sender is a normal `Thread`.