Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Akka.Net await Ask<> within Receive<> deadlocks?
private void Ready()
{
Receive<CanAcceptJob>(AsyncBehavior.Suspend, async job =>
{
_coordinator.Tell(job);
await BecomeAsking();
});
}
private async Task BecomeAsking()
{
_canAcceptJobSender = Sender;
var task = _coordinator.Ask<Routees>(new GetRoutees());
var routees = await task; // deadlocks here!
pendingJobReplies = routees.Members.Count();
Become(Asking);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.