
On 2008-09-18 20:54:11 GMT, Robert wrote:
The only thing I can see is that the unconsumed_event() function is called with the unexpected event object. What I'd like to do in this function is:
1. Abort my transaction and force the state machine back to the Ready state. I'm not sure how to do this.
I've implemented a hack with an internal event, ResetEvent, that I
post. This sort of works, but it executes the exit() member function
of the aborted state. I'd rather not, I'm trying to abort the
behavior of the current state, not complete it.
If there was a way from unconsumed_event() to get the current state
object and set a flag in it, I could avoid completing the state
behavior with a guard. I can use state_downcast
2. Reprocess the unexpected event if it is a hello or get, discard it otherwise. I'm not sure how to do this, either.
I've discovered that post_event() will enqueue any event for processing after the current react() is finished. Thanks for any insight you can provide, -- Robert