Reputation: 655
An actor may perform async operations inside the onReceive method, so returning from onReceive doesn't necessarily mean the actor has finished processing the message completely?
How exactly does Akka know when an actor has finished processing the current message, to send it another message to process?
Upvotes: 3
Views: 578
Reputation: 7247
An actor will process the next message in its queue as soon as its receive function as returned, regardless of any futures that may be created. If you need to ensure that an actor doesn't process the next message until futures have completed, you'll have to handle that yourself.
Upvotes: 3