diff options
-rw-r--r-- | lib/stdlib/doc/src/supervisor.xml | 7 | ||||
-rw-r--r-- | system/doc/design_principles/sup_princ.xml | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml index b4baf2f0a0..54e7cab884 100644 --- a/lib/stdlib/doc/src/supervisor.xml +++ b/lib/stdlib/doc/src/supervisor.xml @@ -171,6 +171,13 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules} should be set to <c>infinity</c> to give the subtree ample time to shutdown. It is also allowed to set it to <c>infinity</c>, if the child process is a worker.</p> + <warning> + <p>Be careful by setting the <c>Shutdown</c> strategy to + <c>infinity</c> when the child process is a worker. Because, in this + situation, the termination of the supervision tree depends on the + child process, it must be implemented in a safe way and its cleanup + procedure must always return.</p> + </warning> <p><em>Important note on simple-one-for-one supervisors:</em> The dynamically created child processes of a simple-one-for-one supervisor are not explicitly killed, diff --git a/system/doc/design_principles/sup_princ.xml b/system/doc/design_principles/sup_princ.xml index 42d9f3e3d8..9e7cc2f543 100644 --- a/system/doc/design_principles/sup_princ.xml +++ b/system/doc/design_principles/sup_princ.xml @@ -184,6 +184,13 @@ init(...) -> shutdown. It is also allowed to set it to <c>infinity</c>, if the child process is a worker.</item> </list> + <warning> + <p>Be careful by setting the <c>Shutdown</c> strategy to + <c>infinity</c> when the child process is a worker. Because, in this + situation, the termination of the supervision tree depends on the + child process, it must be implemented in a safe way and its cleanup + procedure must always return.</p> + </warning> </item> <item> <p><c>Type</c> specifies if the child process is a supervisor or |