Skip to content

Commit

Permalink
docs: supervision doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Tochemey committed Aug 5, 2024
1 parent d42c4e6 commit 95b44ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ The following directives are supported:
- [`Stop`](./actors/supervisor.go): to stop the child actor which is the default one
- [`Resume`](./actors/supervisor.go): ignores the failure and process the next message, instead.

with the `Restart` directive, every child actor of the faulty is stopped and garbage-collected when the given parent is restarted. This helps avoid resources leaking.
With the `Restart` directive, every child actor of the faulty is stopped and garbage-collected when the given parent is restarted. This helps avoid resources leaking.
There are only two scenarios where an actor can supervise another actor:
- It watches the given actor via the `Watch` method. With this method the parent actor can also listen to the `Terminated` message to decide what happens next to the child actor.
- The actor to be supervised is a child of the given actor.

### Actor System

Expand Down

0 comments on commit 95b44ec

Please sign in to comment.