celluloid/celluloid — pull request #253 by halorgium (2013-05-13 14:47:19+00:00)
Title: Synchronize reactor shutdown with message adding

Currently there is a small race when terminating an `Actor` using the `EventedMailbox` and any `Actor`s which are linked to it.

The messages are delivered to the mailbox while the mailbox is shutting down.

This change ensures that the reactor is shutdown before *OR* after a message is attempted to be added to the mailbox.
The result is either the message is delivered, or discarded.