From 229d0d8ca88bc344bed89e46541b325c1d267996 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 6 May 2011 15:58:09 +0200 Subject: r Use Erlang specs and types for documentation --- lib/stdlib/doc/src/supervisor_bridge.xml | 47 +++++++++++++------------------- 1 file changed, 19 insertions(+), 28 deletions(-) (limited to 'lib/stdlib/doc/src/supervisor_bridge.xml') diff --git a/lib/stdlib/doc/src/supervisor_bridge.xml b/lib/stdlib/doc/src/supervisor_bridge.xml index cbd0d9230b..c1a5e7947f 100644 --- a/lib/stdlib/doc/src/supervisor_bridge.xml +++ b/lib/stdlib/doc/src/supervisor_bridge.xml @@ -50,46 +50,37 @@ - start_link(Module, Args) -> Result - start_link(SupBridgeName, Module, Args) -> Result + + Create a supervisor bridge process. - - SupBridgeName = {local,Name} | {global,Name} -  Name = atom() - Module = atom() - Args = term() - Result = {ok,Pid} | ignore | {error,Error} -  Pid = pid() -  Error = {already_started,Pid} | term() -

Creates a supervisor_bridge process, linked to the calling - process, which calls Module:init/1 to start the subsystem. + process, which calls Module:init/1 to start the subsystem. To ensure a synchronized start-up procedure, this function does - not return until Module:init/1 has returned.

-

If SupBridgeName={local,Name} the supervisor_bridge is - registered locally as Name using register/2. - If SupBridgeName={global,Name} the supervisor_bridge is - registered globally as Name using + not return until Module:init/1 has returned.

+

If SupBridgeName={local,Name} the supervisor_bridge is + registered locally as Name using register/2. + If SupBridgeName={global,Name} the supervisor_bridge is + registered globally as Name using global:register_name/2. If no name is provided, the supervisor_bridge is not registered. If there already exists a process with the specified - SupBridgeName the function returns - {error,{already_started,Pid}}, where Pid is the pid + SupBridgeName the function returns + {error,{already_started,Pid}}, where Pid is the pid of that process.

-

Module is the name of the callback module.

-

Args is an arbitrary term which is passed as the argument - to Module:init/1.

+

Module is the name of the callback module.

+

Args is an arbitrary term which is passed as the argument + to Module:init/1.

If the supervisor_bridge and the subsystem are successfully - started the function returns {ok,Pid}, where Pid is + started the function returns {ok,Pid}, where Pid is is the pid of the supervisor_bridge.

-

If Module:init/1 returns ignore, this function +

If Module:init/1 returns ignore, this function returns ignore as well and the supervisor_bridge terminates with reason normal. - If Module:init/1 fails or returns an error tuple or an - incorrect value, this function returns {error,Term} where - Term is a term with information about the error, and - the supervisor_bridge terminates with reason Term.

+ If Module:init/1 fails or returns an error tuple or an + incorrect value, this function returns {error,Errorr} where + Error is a term with information about the error, and + the supervisor_bridge terminates with reason Error.

-- cgit v1.2.3