-
Notifications
You must be signed in to change notification settings - Fork 4
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
Exception safety #5
Comments
Could it be that the better ordering in this case is to shut down the supervisor first, and then the children? (Might need to mask Alternatively, the supervisor could hold a "shutdown flag" in STM, and on |
@srijs now that we have epochs, do you think that comment has still value? In theory what should happen in the described scenario is that the letter would be considered stale and ignored. Perhaps we should have a test case replicating that scenario, making sure that's indeed the case. |
I'm not convinced the introduction of epochs alone solves this problem yet. I imagine the easiest way to achieve thread safety for actions on supervisors would be to linearise all actions. This is partly what we have already with the If we extended the supervisors ingress message queue to also carry shutdown commands (and have (Incidentally this is exactly how Erlang does it too :P) |
@adinapoli threw together a rough sketch of what I mean here: #26 |
@srijs I like this approach! Incidentally, it seems we are slowly converging towards the same pattern (see my PR on epochs): having the other functions writing richer messages inside the queue, and having everything processed by handleEvents 😉 |
A valid comment on Reddit:
The text was updated successfully, but these errors were encountered: