aboutsummaryrefslogtreecommitdiffstats
path: root/system/doc/design_principles/statem.xml
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2017-01-24 14:15:26 +0100
committerRaimo Niskanen <[email protected]>2017-01-30 14:35:23 +0100
commit85e9fed232a6d89e3659cabbb2169cf3e21127e3 (patch)
tree8b45b6d2f537edbe7f85681308e3240b1e7acab6 /system/doc/design_principles/statem.xml
parent60f8840e8e62dece4a7e2e58f0d9e487c4e8018f (diff)
downloadotp-85e9fed232a6d89e3659cabbb2169cf3e21127e3.tar.gz
otp-85e9fed232a6d89e3659cabbb2169cf3e21127e3.tar.bz2
otp-85e9fed232a6d89e3659cabbb2169cf3e21127e3.zip
Implement repeat_state and repeat_state_and_data
Diffstat (limited to 'system/doc/design_principles/statem.xml')
-rw-r--r--system/doc/design_principles/statem.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/system/doc/design_principles/statem.xml b/system/doc/design_principles/statem.xml
index f627145f9f..8e7f496d9e 100644
--- a/system/doc/design_principles/statem.xml
+++ b/system/doc/design_principles/statem.xml
@@ -1180,6 +1180,17 @@ open(state_timeout, lock, Data) ->
{next_state, locked, Data};
...
]]></code>
+ <p>
+ You can repeat the state entry code by returning one of
+ <c>{repeat_state, ...}</c>, <c>{repeat_state_and_data,_}</c>
+ or <c>repeat_state_and_data</c> that otherwise behaves
+ exactly like their <c>keep_state</c> siblings.
+ See the type
+ <seealso marker="stdlib:gen_statem#type-state_callback_result">
+ <c>state_callback_result()</c>
+ </seealso>
+ in the reference manual.
+ </p>
</section>
<!-- =================================================================== -->