From 4ebdabdca2c964887115f21405993f3916843d10 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen
Date: Fri, 16 Sep 2016 10:15:22 +0200
Subject: Improve docs
---
lib/stdlib/doc/src/gen_statem.xml | 33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)
(limited to 'lib/stdlib')
diff --git a/lib/stdlib/doc/src/gen_statem.xml b/lib/stdlib/doc/src/gen_statem.xml
index a4c5438a08..944e9ab13b 100644
--- a/lib/stdlib/doc/src/gen_statem.xml
+++ b/lib/stdlib/doc/src/gen_statem.xml
@@ -583,6 +583,20 @@ handle_event(_, _, State, Data) ->
Module:callback_mode/0
does not return such a list, no state entry events are inserted.
+
+ No state entry event will be inserted after a
+ Module:code_change/4
+ since transforming the state to a newer version is regarded
+ as staying in the same state even if the newer version state
+ should have a different name.
+
+
+ Note that a state entry event will be inserted
+ when entering the initial state even though this formally
+ is not a state change. In this case OldState
+ will be the same as State, which can not happen
+ for an actual state change.
+
@@ -1335,7 +1349,7 @@ handle_event(_, _, State, Data) ->
CallbackMode =
callback_mode() |
[ callback_mode()
- | state_entry_events ]
+ | state_entry_events ]
@@ -1368,23 +1382,6 @@ handle_event(_, _, State, Data) ->
and possibly the atom
state_entry_events.
-
- If the atom state_entry_events is present in the list,
- the gen_statem engine will, at every state change,
- insert an event of type
- enter
- with content OldState. This event will be inserted
- before all other events such as those generated by
- action()
- next_event.
-
-
- No state entry event will be inserted after a
- Module:code_change/4
- since transforming the state to a newer version is regarded
- as staying in the same state even if the newer version state
- should have a different name.
-
If this function's body does not return an inline constant
--
cgit v1.2.3