From 8cc0a419f847103199524e3d922a1087d23d8d8a Mon Sep 17 00:00:00 2001 From: Raimo Niskanen Date: Fri, 19 Feb 2016 10:31:03 +0100 Subject: Shorten taglists in the documentation --- lib/stdlib/doc/src/gen_statem.xml | 193 +++++++++++--------------------------- 1 file changed, 57 insertions(+), 136 deletions(-) (limited to 'lib') diff --git a/lib/stdlib/doc/src/gen_statem.xml b/lib/stdlib/doc/src/gen_statem.xml index 5f9ec6736e..9cddce98da 100644 --- a/lib/stdlib/doc/src/gen_statem.xml +++ b/lib/stdlib/doc/src/gen_statem.xml @@ -207,19 +207,19 @@ erlang:'!' -----> Module:StateName/5 above.

It can be:

- - the pid(), - Name, - if the gen_statem is locally registered, - - {Name,Node}, - if the gen_statem is locally registered at another node, or + + pid() + LocalName + The gen_statem is locally registered. + Name, Node + The gen_statem is locally registered on another node. - {global,GlobalName}, - if the gen_statem is globally registered. + GlobalName + The gen_statem is globally registered + in global. - {via,RegMod,ViaName}, - if the gen_statem is registered through + RegMod, ViaName + The gen_statem is registered through an alternative process registry. The registry callback module RegMod should export the functions @@ -230,7 +230,7 @@ erlang:'!' -----> Module:StateName/5 Thus, {via,global,GlobalName} is the same as {global,GlobalName}. - + @@ -268,9 +268,10 @@ erlang:'!' -----> Module:StateName/5

Client address to use when replying through for example the - state_op() - {reply,Client,Reply} to a client - that has called the gen_statem server using + + state_op() {reply,Client,Reply} + + to a client that has called the gen_statem server using call/2.

@@ -426,7 +427,6 @@ erlang:'!' -----> Module:StateName/5

postpone - {postpone,Postpone} If Postpone =:= true or plain postpone postpone the current event to be retried after a state change. @@ -437,7 +437,6 @@ erlang:'!' -----> Module:StateName/5 since there is no event to postpone in those cases. hibernate - {hibernate,Hibernate} If Hibernate =:= true or plain hibernate hibernate the gen_statem by calling @@ -447,17 +446,16 @@ erlang:'!' -----> Module:StateName/5 is ignored as if an event just arrived and awakened the gen_statem. - - {timeout,Time,Msg} + timeout Generate an event of type timeout after Time milliseconds unless some other event is received before that time. Note that a retried event counts just like a new in this respect. - If Time =:= infinity or Time =:= 0 - no timer is started but for zero time the timeout - event is immediately enqueued as the newest received. + If Time =:= infinity no timer is started. + If Time =:= 0 the timeout event + is immediately enqueued as the newest received. Also note that it is not possible nor needed to cancel this timeout using the @@ -480,58 +478,45 @@ erlang:'!' -----> Module:StateName/5 and for reply_operation() that the order may matter.

- - - {next_event,EventType,EventContent} - - - Insert the given event as the next to process. + next_event + Insert the given EventType + and EventContent the next to process. An event of type internal should be used when you want to reliably distinguish an event inserted this way from any external event. - - - {remove_event,EventType,EventContent} - - + remove_event Remove the oldest queued event - that matches equal to the given event. - - - - {remove_event,EventPredicate} - - - Remove the oldest queued event for which - the EventPredicate returns true. + that matches equal to EventType + and EventContent or for which + EventPredicate returns true. - {cancel_timer,TimerRef} - Uses TimerRef when calling + cancel_timer + Cancel the timer by calling erlang:cancel_timer/2 - to cancel a timer, cleans the gen_statem's - message queue from any late timeout message from - the timer, and removes any late timeout message - from the queued events using +
with TimerRef, + clean the process message queue from any late timeout message, + and removes any late timeout message + from the gen_statem event queue using {remove_event,EventPredicate} above. This is a convenience function that saves quite some lines of code and testing time over doing it from the primitives mentioned above.
- {demonitor,MonitorRef} - Like {cancel_timer,_} above but for + demonitor + Like cancel_timer above but for demonitor/2 - . + with MonitorRef. {unlink,Id} Like {cancel_timer,_} above but for unlink/1 - . + with Id.
@@ -539,109 +524,45 @@ erlang:'!' -----> Module:StateName/5 - - - {reply,Client,Reply} - - Reply to a client that called - call/2. - Client must be the term from the - - {call,Client} - argument to the - state function. - - +

Reply to a client that called + call/2. + Client must be the term from the + + {call,Client} + argument to the + state function. +

- - {stop,Reason} - - The same as - {stop,Reason,[],StateData} - but keeps the old StateData. - - - {stop,Reason,NewStateData} - - The same as - {stop,Reason,[],NewStateData} - - {stop, - Reason, - Replies, - NewStateData} - - The gen_statem will first send all - Replies and then terminate by calling + stop + Send all Replies if given, + then terminate the gen_statem by calling Module:terminate/3 - with Reason. + with Reason and + NewStateData, if given. - - - {next_state,NewState,NewStateData} - - - The same as - - {next_state,NewState,NewStateData,[]} - - - - - {next_state, - NewState, - NewStateData, - StateOps} - - + next_state The gen_statem will do a state transition to NewState - (which may be the same as the current state) + (which may be the same as the current state), + set NewStateData and execute all StateOps - - - {keep_state,NewStateData}} - - - The same as - - {keep_state,NewStateData,[]} - - - - - {keep_state,NewStateData,StateOps} - - + keep_state The gen_statem will keep the current state, or do a state transition to the current state if you like, + set NewStateData and execute all StateOps - - - {keep_state_and_data} - - - The same as - - {keep_state_and_data,[]} - - - - - {keep_state_and_data,StateOps} - - + keep_state_and_data The gen_statem will keep the current state, or do a state transition to the current state if you like, - also keep the current state data, + keep the current state data, and execute all StateOps -- cgit v1.2.3