From 35985299ae5414fb448d9961071f722ce209f0b6 Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Fri, 20 Jan 2017 16:22:15 +0100 Subject: Change arity of type to init_result/1 --- lib/stdlib/doc/src/gen_statem.xml | 67 +++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 35 deletions(-) (limited to 'lib/stdlib/doc/src/gen_statem.xml') diff --git a/lib/stdlib/doc/src/gen_statem.xml b/lib/stdlib/doc/src/gen_statem.xml index fd498ee82e..6fa2d86e0b 100644 --- a/lib/stdlib/doc/src/gen_statem.xml +++ b/lib/stdlib/doc/src/gen_statem.xml @@ -4,7 +4,7 @@
- 2016 + 2016-2017 Ericsson AB. All Rights Reserved. @@ -982,6 +982,33 @@ handle_event(_, _, State, Data) ->

+ + + +

+ For a succesful initialization, + State is the initial + state() + and Data the initial server + data() + of the gen_statem. +

+

+ The Actions + are executed when entering the first + state just as for a + state callback, + except that the action postpone is forced to + false since there is no event to postpone. +

+

+ For an unsuccesful initialization, + {stop,Reason} + or ignore should be used; see + start_link/3,4. +

+
+
@@ -1613,25 +1640,16 @@ handle_event(_, _, State, Data) -> - Module:init(Args) -> Result + Module:init(Args) -> Result(StateType) Optional function for initializing process and internal state. Args = term() - Result = {ok,State,Data} -  | {ok,State,Data,Actions} -  | {stop,Reason} | ignore - State = state() - - Data = data() - - Actions = - [action()] | - action() + Result(StateType) = + init_result(StateType) - Reason = term() @@ -1644,30 +1662,9 @@ handle_event(_, _, State, Data) -> the implementation state and server data.

- Args is the Args argument provided to the start + Args is the Args argument provided to that start function.

-

- If the initialization is successful, the function is to - return {ok,State,Data} or - {ok,State,Data,Actions}. - State is the initial - state() - and Data the initial server - data(). -

-

- The Actions - are executed when entering the first - state just as for a - state callback. -

-

- If the initialization fails, - the function is to return {stop,Reason} - or ignore; see - start_link/3,4. -

This callback is optional, so a callback module does not need -- cgit v1.2.3