diff options
author | Siri Hansen <[email protected]> | 2014-04-29 11:29:51 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2014-05-26 11:53:25 +0200 |
commit | 9a0635c297503e2ce0ae394c9c44c72fc61a2a31 (patch) | |
tree | d38330bcafb17fe5edab09f1f8c1bdbe6a482e73 /lib/stdlib/doc/src | |
parent | 6c3d24ccbc597e6d31db1f559470cc59585fdf52 (diff) | |
download | otp-9a0635c297503e2ce0ae394c9c44c72fc61a2a31.tar.gz otp-9a0635c297503e2ce0ae394c9c44c72fc61a2a31.tar.bz2 otp-9a0635c297503e2ce0ae394c9c44c72fc61a2a31.zip |
Add synchronous stop function to proc_lib
The new function utilizes sys:terminate.
Diffstat (limited to 'lib/stdlib/doc/src')
-rw-r--r-- | lib/stdlib/doc/src/proc_lib.xml | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/lib/stdlib/doc/src/proc_lib.xml b/lib/stdlib/doc/src/proc_lib.xml index 5bf5744622..88630b1fdb 100644 --- a/lib/stdlib/doc/src/proc_lib.xml +++ b/lib/stdlib/doc/src/proc_lib.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1996</year><year>2013</year> + <year>1996</year><year>2014</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -298,6 +298,39 @@ init(Parent) -> <c>proc_lib</c> functions.</p> </desc> </func> + <func> + <name name="stop" arity="1"/> + <fsummary>Terminate a process synchronously.</fsummary> + <type variable="Process"/> + <desc>Equivalent + to <seealso marker="#stop/3">stop(Process, normal, infinity)</seealso>. + </desc> + </func> + <func> + <name name="stop" arity="3"/> + <fsummary>Terminate a process synchronously.</fsummary> + <type variable="Process"/> + <type variable="Reason"/> + <type variable="Timeout"/> + <desc> + <p>Orders the process to exit with the given <c>Reason</c> and + waits for it to terminate.</p> + <p>The function returns <c>ok</c> if the process exits with + the given <c>Reason</c> within <c>Timeout</c> + milliseconds.</p> + <p>If the call times out, a <c>timeout</c> exception is + raised.</p> + <p>If the process does not exist, a <c>noproc</c> + exception is raised.</p> + <p>The implementation of this function is based on the + <c>terminate</c> system message, and requires that the + process handles system messages correctly. + See <seealso marker="sys">sys(3)</seealso> + and <seealso marker="doc/design_principles:spec_proc">OTP + Design Principles</seealso> for information about system + messages.</p> + </desc> + </func> </funcs> <section> |