-
Notifications
You must be signed in to change notification settings - Fork 3k
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
stdlib: Fix proc_lib:stop when exit reason is expected reason #8772
stdlib: Fix proc_lib:stop when exit reason is expected reason #8772
Conversation
CT Test Results 2 files 95 suites 58m 7s ⏱️ Results for commit 3f2d85a. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
I think it sounds reasonable, as the processes are parallel things that may stop execution by themselves or be shutdown by an other process and of course this can happen in the same time and there can be a race which one happens first, but they both end up with the wanted end result. I think it sound strange that we get a crash because something terminated normally! |
Makes sense to me too (although changes existing behaviour). |
I think it comes down to if we consider the current behaviour to be a bug or not. If it is a bug I think it is ok to change it, we never promised to be bug-compatible. |
This has bit me before so I 100% support the change. It's hard to imagine that this change will result in incompatibilities but I'm sure someone somewhere expects a |
I'll merge it into 28 and mark it as a potential incompatability. I too have a hard time seeing someone relying on this. |
be42628
to
3f2d85a
Compare
When working with peer in #8537 I got a lot of errors where gen_server:stop would crash with reason
normal
as the peer process terminated with that reason just as gen_server:stop was called. I'm opening this PR to start a discussion to see if we want to make it so that if a process exits with the expected reason, though not was a result of the stop call, we should still consider it a successful shutdown?