diff options
author | Christopher Faulet <[email protected]> | 2011-09-14 17:49:38 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-09-16 14:54:44 +0200 |
commit | 04731323678eff58f709b36f864d12aa08cfe6d9 (patch) | |
tree | 2c1646f7d690358e284296360d1da985a83228f8 | |
parent | 42c581ddefd332fcadea696b5b2bedcdd575f14a (diff) | |
download | otp-04731323678eff58f709b36f864d12aa08cfe6d9.tar.gz otp-04731323678eff58f709b36f864d12aa08cfe6d9.tar.bz2 otp-04731323678eff58f709b36f864d12aa08cfe6d9.zip |
Explain how dynamic child processes are stopped
-rw-r--r-- | lib/stdlib/doc/src/supervisor.xml | 4 | ||||
-rw-r--r-- | system/doc/design_principles/sup_princ.xml | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml index b4e81aba1f..9cc9b69dd9 100644 --- a/lib/stdlib/doc/src/supervisor.xml +++ b/lib/stdlib/doc/src/supervisor.xml @@ -94,6 +94,10 @@ instead the child specification identifier is used, <c>terminate_child/2</c> will return <c>{error,simple_one_for_one}</c>.</p> + <p>Because a <c>simple_one_for_one</c> supervisor could have many + children, it shuts them all down at same time. So, order in which they + are stopped is not defined. For the same reason, it could have an + overhead with regards to the <c>Shutdown</c> strategy.</p> </item> </list> <p>To prevent a supervisor from getting into an infinite loop of diff --git a/system/doc/design_principles/sup_princ.xml b/system/doc/design_principles/sup_princ.xml index 2748f21bbe..df0777559a 100644 --- a/system/doc/design_principles/sup_princ.xml +++ b/system/doc/design_principles/sup_princ.xml @@ -341,6 +341,10 @@ call:start_link(id1)</code> supervisor:terminate_child(Sup, Pid)</code> <p>where <c>Sup</c> is the pid, or name, of the supervisor and <c>Pid</c> is the pid of the child.</p> + <p>Because a <c>simple_one_for_one</c> supervisor could have many children, + it shuts them all down at same time. So, order in which they are stopped is + not defined. For the same reason, it could have an overhead with regards to + the <c>Shutdown</c> strategy.</p> </section> <section> |