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
exit freezes the first value it sees #4097
Comments
FWIW, it feels like a case of DIHWIDT, as you would not typically use The alternative was to completely disallow |
"DIHWIDT" means, "Doctor, it hurts when I do this", right? 😆 |
Is this an issue with It seems like the latter might be worth documenting but I'm unsure how this relates to |
No. It was done with the conscious decision that the first time
Note that this is different from throwing an exception: that won't actually exit until all applicable phasers have run. |
Consider the following code:
Can you guess the exit code? Right now the thread that first gets to set a state container in
exit
wins. In the case of the END-phasers, the last registered phaser wins. If threads are involved, that may become random as well. Also, any module may add END-phasers at runtime (EVAL being evil). All this is not covered by Roast and we should warn that depending on exit is depeding on impelentation details, which may change whenever the compiler is upgrated.The text was updated successfully, but these errors were encountered: