Opened 13 years ago
Closed 13 years ago
#3220 closed Bugs (invalid)
Event responded to multiple times in one update
Reported by: | anonymous | Owned by: | Andreas Huber |
---|---|---|---|
Milestone: | Boost 1.40.0 | Component: | statechart |
Version: | Boost 1.39.0 | Severity: | Problem |
Keywords: | statechart orthogonal event dispatch | Cc: |
Description
I have created a state that has three orthogonal regions. This states to an event, evSay, by printing a message. One of the child states posts evSay in its ctor. Instead of the expected message, I get teh message repeated three times.
see attached code
Attachments (1)
Change History (2)
by , 13 years ago
comment:1 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
The observed behavior is in line with the one specified in the reference:
<http://www.boost.org/libs/statechart/doc/reference.html#forward_event>
Line number 38 of bug.cpp currently reads ...
return forward_event();
Replace this with ...
return discard_event();
... and the program should then work as expected.
Note that forward_event() should only be used in cases where a react member function determines that the passed event should be handled either in an outer state or a different orthogonal region.
code example