akkadotnet/akka.net — pull request #123 by Aaronontheweb (2014-04-22 18:17:44+00:00)
Title: Fixed a deadlock issue with AskSupport

Found an issue inside `Ask` support where you could easily create a deadlock by waiting on the results of an `Ask` operation inside an actor's receive loop. The issue is that once an Actor waits on the results of a `Ask` operation, its Mailbox is always busy and is unable to post the `CompleteFuture` result.

The `ActorCell.Post` method now does a special check for whether or not an incoming message is a `CompleteFuture` or not and will automatically hand off the `CompleteFuture` to the ActorCell's `HandleCompleteFuture` method inline, without going to the inbox.

Also added a unit test to `AskSpec` to test for this issue.

Going to leave this sitting in dev branch for a day or so before I push v0.5.1 to NuGet with this bug fix - in case there's a better way of fixing this issue than what I've proposed.