aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src/gen_statem.xml
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2016-02-19 09:22:52 +0100
committerRaimo Niskanen <[email protected]>2016-02-19 09:22:52 +0100
commit65767cfc36cf8658b45d68b3c17d4bd612198165 (patch)
treebb7647378e0d1728d2feda9c64f05e07458a2be1 /lib/stdlib/doc/src/gen_statem.xml
parent26a7af61fbffae90c0968d945ae8b146582ba068 (diff)
downloadotp-65767cfc36cf8658b45d68b3c17d4bd612198165.tar.gz
otp-65767cfc36cf8658b45d68b3c17d4bd612198165.tar.bz2
otp-65767cfc36cf8658b45d68b3c17d4bd612198165.zip
Add {keep_state,...} and {keep_state_and_data,...}
Diffstat (limited to 'lib/stdlib/doc/src/gen_statem.xml')
-rw-r--r--lib/stdlib/doc/src/gen_statem.xml61
1 files changed, 44 insertions, 17 deletions
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 <c>next_event</c> 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 <c>{remove_event,<anno>EventPredicate</anno>}</c>
- that the order may matter.
+ it is only for <c>remove_event</c> with
+ <c><anno>EventPredicate</anno></c>
+ and for <c>reply_operation()</c> that the order may matter.
</p>
<taglist>
<tag>
@@ -583,19 +584,6 @@ erlang:'!' -----> Module:StateName/5
</item>
<tag>
<c>
- {next_state,<anno>StateOps</anno>}
- </c>
- </tag>
- <item>The same as
- <c>
- {next_state,State,StateData,<anno>StateOps</anno>}
- </c>but keeps the old <c>State</c> and <c>StateData</c>.
- Believe it or not, but this one has actually
- been proven useful to <c>throw/1</c> from deep down
- in the state logic.
- </item>
- <tag>
- <c>
{next_state,<anno>NewState</anno>,<anno>NewStateData</anno>}
</c>
</tag>
@@ -614,8 +602,47 @@ erlang:'!' -----> Module:StateName/5
</tag>
<item>The gen_statem will do a state transition to
<c><anno>NewState</anno></c>
- (which may be the same as <c>State</c>)
- and execute all <c>StateOps</c>
+ (which may be the same as the current state)
+ and execute all <c><anno>StateOps</anno></c>
+ </item>
+ <tag>
+ <c>
+ {keep_state,<anno>NewStateData</anno>}}
+ </c>
+ </tag>
+ <item>The same as
+ <c>
+ {keep_state,<anno>NewStateData</anno>,[]}
+ </c>
+ </item>
+ <tag>
+ <c>
+ {keep_state,<anno>NewStateData</anno>,<anno>StateOps</anno>}
+ </c>
+ </tag>
+ <item>The gen_statem will keep the current state, or
+ do a state transition to the current state if you like,
+ and execute all <c><anno>StateOps</anno></c>
+ </item>
+ <tag>
+ <c>
+ {keep_state_and_data}
+ </c>
+ </tag>
+ <item>The same as
+ <c>
+ {keep_state_and_data,[]}
+ </c>
+ </item>
+ <tag>
+ <c>
+ {keep_state_and_data,<anno>StateOps</anno>}
+ </c>
+ </tag>
+ <item>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 <c><anno>StateOps</anno></c>
</item>
</taglist>
</desc>