-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Actor's init
taking longer than init_timeout
causes entire program to crash
#73
Comments
Hello! the program is crashing as the linked child process is timing out and it is not supervised, so the exit continues to propagates until it reaches a process trapping exits (there is not one in this case) or until it reaches the root process, crashing the program. Do you have some particular issue? |
If this is the expected behavior then maybe I'm misunderstanding the documentation, or something specific about my implementation. It says here:
Based on the documentation my assumption was that the code above wouldn't crash but instead would instead return |
Ah yes, a bug for sure. Thank you. I presume we want it to not crash but I've not the time to sit down and think through the implications of that and how we would implement it. I'm also thinking back to something @CrowdHailer said years back, that perhaps init should not fail and starting an actor shouldn't return a result. Could be a good thing to think about now as we're looking at making some breaking changes to support naming. |
My opinion has not changed. But I don't have any new compelling arguments. |
What were your old arguments? If you can remember the details 😄 |
I think that you should always be able to validate the initial state before calling an init. And you shouldn't rely on anther pid/service without you actor understanding failure in reaching that service. I think Async init was a problem. I dunno, I'd have to play again to make better arguments |
Like the title describes, I've run into an issue where if the
init
takes too long instead of returning an error thenactor.start_spec
will crash the entire program with the following error:I'm using
Erlang/OTP 27
and have tried onErlang/OTP 25
with the same result.Below is a code snippet that demonstrates the issue.
The text was updated successfully, but these errors were encountered: