Implementation of the exit_process for Actor #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
In my journey of learning how the OTP works, when I tried to send an exit signal to an Actor I noticed that the
exit_process
wasn't fully implemented. So, I tried to give it a try and implement it based on:Apologies in advance if this isn't the correct way of implementing the Shutdown protocol. I will be more than happy to amend the PR with a more correct Shutdown protocol based on the received feedback.
Changes
otp/actor.gleam
(I can move this to a separate PR, if necessary).exit_process
now supports Normal, Killed and Abnormal exit reasons.failed_init_test
: this test was blocking the whole actor test from running due to an unhandled crash.exit_process
implementation: this covers the Normal, Killed and Abnormal reasons.