Boost logo

Boost :

Subject: Re: [boost] [MSM] exit_ps stuks in case of outer state machine uses Row with event to event base class
From: Christophe Henry (christophe.j.henry_at_[hidden])
Date: 2011-06-15 00:42:37


> 3. This one is my fault and might be a problem for you as you seek
> performance. I think we discussed this but I forgot it in the doc. Pseudo
> exits require the message queue and you deactivated it with:
> typedef int no_message_queue;

Thinking again about it, as you have the newest MSM version (time for a bit
of advertisement for the new version ;-) ), there is now a way around the
queue.
The exit point needs the queue because it will process an event4 during
processing of event3, so that MSM has time to update its current state
before processing event4. But this is only because MSM does this after the
transition (the UML standard "forgot" to specify this point).
The newest version allows you to override this and decide that this
updating job will be done for example before the transition is taken (after
the guard chooses the transition of course), or after the exit action, etc.
To do this, add into every state machine:

typedef msm::active_state_switch_before_transition
active_state_switch_policy;

Now you don't need the queue. Doc is there:
http://svn.boost.org/svn/boost/trunk/libs/msm/doc/HTML/ch03s05.html#backend-state-switch

Regards,
Christophe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk