Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::MSM: Transition Priority
From: georg_at_[hidden]
Date: 2015-03-17 03:45:33


> Hi,
>
Hi,

> As we're talking about anonymous transitions, I read "repeatedly", but
> please be careful not to add another anonymous transition back otherwise
> you
> might get into an endless loop of anonymous transitions.

I tried your suggestion, and only this did work.

struct OnlyIfNoDeferred
{
        template<class Event, class Fsm, class SourceState, class TargetState>
        bool operator()(Event const &, Fsm & aFsm, SourceState &, TargetState &)
        {
                size_t s_mq = aFsm.get_message_queue().size();
                size_t s_dq = aFsm.get_deferred_queue().size();
                return aFsm.get_message_queue().empty();
        }
};

s_mq = 1
s_dq = 0

This functor does now work. I just answer and ask again, because i thought
that the defered queue should be size=1 and not the message queue.... Is
this a bug or is this intended behaviour?

>
> HTH,
> Christophe
Thanks,
Georg


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net