Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
1040-erlang-module-doc-is_process_alive.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1040-erlang-module-doc-is_process_alive.patch of Package erlang
From e1bd0f040b31a64529c34626a948cd0797cb39dc Mon Sep 17 00:00:00 2001 From: Kjell Winblad <kjellwinblad@gmail.com> Date: Tue, 22 Sep 2020 15:05:19 +0200 Subject: [PATCH 30/39] erlang module doc: is_process_alive * Add example * Add info about order guarantee --- erts/doc/src/erlang.xml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index a16c12e034..a935130658 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2818,7 +2818,27 @@ false</code> node.</p> <p>Returns <c>true</c> if the process exists and is alive, that is, is not exiting and has not exited. Otherwise returns - <c>false</c>.</p> + <c>false</c>.</p> + <p>If process <c>P1</c> calls <c>is_process_alive(P2Pid)</c> + it is guaranteed that all signals, sent from <c>P1</c> to + <c>P2</c> (<c>P2</c> is the process with identifier + <c>P2Pid</c>) before the call, will be delivered to <c>P2</c> + before the aliveness of <c>P2</c> is checked. This guarantee + means that one can use <c>is_process_alive/1</c> to let a + process <c>P1</c> wait until a process <c>P2</c>, which has + got an exit signal with reason <c>kill</c> from P1, is + killed. Example: + </p> +<pre> +exit(P2Pid, kill), +% P2 might not be killed +is_process_alive(P2Pid), +% P2 is not alive (the call above always return false) +</pre> + <p>See the documentation about <seealso + marker="erts:communication">communication in Erlang</seealso> + and <seealso marker="#exit/2">erlang:exit/2</seealso> for more + information about signals and exit singnals.</p> </desc> </func> -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor