-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request(...).await(...)
may block system messages
#1584
Comments
Thanks for reporting!
Let me think a bit about this. My first impulse is to actually tag this as bug and just fix it. If you would have asked me prior whether an exit message should be blocked by an |
I totally agree that by the Principle of Least Surprise this should be considered a bug. I went on a journey throughout our code base this morning, and I did not find a single place where this would break things, but much rather found two other places where we await during startup of an actor which would delay an immediate shutdowns. |
Thanks for going the extra mile. 🙂 I also can't think of a legit use case we would "break" by having the actor always respondingto system messages (which was my assumption how this is supposed to work from the beginning). So let's just call it a bug. I'll have a patch ready, filing as a PR shortly. |
Note
Previously discussed in Gitter: https://app.gitter.im/#/room/#caf-community:gitter.im/$-flOmQATGnfq3hQiYSVnTLkSvgp4W3fFJHtWJ7Ikl2k
Using
request(...).await(...)
blocks exit and down messages, which—at least for exit messages—should probably be considered a bug. In our particular case, it has led to an actor lingering in a process until the request receiving actor shut down.I think that no system message should be blocked by an awaited response. That is, however, a very hard-to-make breaking change, and I am not certain what the real-world impact of this change would be to existing library users.
The text was updated successfully, but these errors were encountered: