From 65767cfc36cf8658b45d68b3c17d4bd612198165 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen
Date: Fri, 19 Feb 2016 09:22:52 +0100
Subject: Add {keep_state,...} and {keep_state_and_data,...}
---
lib/stdlib/doc/src/gen_statem.xml | 61 ++++++++++++++++++++++++++++-----------
1 file changed, 44 insertions(+), 17 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 9d98763973..f66f399137 100644
--- a/lib/stdlib/doc/src/gen_statem.xml
+++ b/lib/stdlib/doc/src/gen_statem.xml
@@ -475,8 +475,9 @@ erlang:'!' -----> Module:StateName/5
list order. This matters for next_event where
the last one in the list will become the next event to present
to the state functions. Regarding the other operations
- it is only for {remove_event,EventPredicate}
- that the order may matter.
+ it is only for remove_event with
+ EventPredicate
+ and for reply_operation() that the order may matter.
@@ -581,19 +582,6 @@ erlang:'!' -----> Module:StateName/5
Module:terminate/3
with Reason.
-
-
- {next_state,StateOps}
-
-
- - The same as
-
- {next_state,State,StateData,StateOps}
- but keeps the old State and StateData.
- Believe it or not, but this one has actually
- been proven useful to throw/1 from deep down
- in the state logic.
-
{next_state,NewState,NewStateData}
@@ -614,8 +602,47 @@ erlang:'!' -----> Module:StateName/5
- The gen_statem will do a state transition to
NewState
- (which may be the same as State)
- and execute all StateOps
+ (which may be the same as the current state)
+ and execute all StateOps
+
+
+
+ {keep_state,NewStateData}}
+
+
+ - The same as
+
+ {keep_state,NewStateData,[]}
+
+
+
+
+ {keep_state,NewStateData,StateOps}
+
+
+ - The gen_statem will keep the current state, or
+ do a state transition to the current state if you like,
+ and execute all StateOps
+
+
+
+ {keep_state_and_data}
+
+
+ - The same as
+
+ {keep_state_and_data,[]}
+
+
+
+
+ {keep_state_and_data,StateOps}
+
+
+ - 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,
+ and execute all StateOps
--
cgit v1.2.3