Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.7.1, 1.8.0
Description
Some RpcEndpoints would benefit from being able to run asynchronous stop operations in the main thread executor. At the moment, this is not possible since RpcEndpoint#postStop is called by by UntypedActor#postStop which is the last call for an actor.
I suggest to introduce a new method RpcEndpoint#onStop which is executed when the RpcEndpoint is requested to terminate. Internally, this method will be called when the UntypedActor is still running, thus, allowing to execute arbitrary other messages (e.g. asynchronous operations in the main thread executor). Only after the future returned by onStop is completed, the underlying UntypedActor will shut down.
Attachments
Issue Links
- links to