Subject: Re: [boost] Boost MSM parallel behavior with delayed self-transitions?
From: Danylo Malyuta (danylo.malyuta_at_[hidden])
Date: 2017-03-21 20:35:02
Thanks for your input. I'm going to use std::thread for the parallel
functionality, I think. How stable/complete is Asynchronous? Can I rely on
it, or would I still have a moderate chance of running into bugs?
PS. I love your documentation! What do you use for state machine diagrams -
On Tue, Mar 21, 2017 at 1:11 PM, Christophe Henry via Boost <
> Hi Danylo,
> >Hi community,
> > I am using Boost MSM (basic and functor front-ends) and am trying to
> >implement the following state machine (https://i.stack.imgur.com/
> Ok, State1 is itself a state machine (also called composite). See:
> Then you have 2 active states, which are called orthogonal regions. See:
> >I am using Boost MSM (basic and functor front-ends) and am trying to
> >implement the following state machine: enter image description here
> >In words:
> < snip >
> >I would like to know the way to create this state machine in Boost MSM.
> The above link has an example.
> >There are two tricks here which I cannot figure out how to do:
> > - Execution in parallel (i.e. running action_A does not stop running
> >action_B at the same time)
> It depends what you mean with "in parallel". Having 2 active states means
> that the actions execute only logically at the same time, meaning within
> the same process_event call. But as you have just one thread, they will
> execute after each other.
> If you mean in different threads, then no, the library does not support
> this. But my next library, Asynchronous does (
> I have examples with state machines, timer, etc.
> >- Delayed transition (i.e. the transitions which happen after 2
> >seconds for state A and after 5 seconds for state B). Neither delay
> >should be blocking! The transitions should just "fire" after this time.
> Sorry, this is out of scope of the library as it would involve threads. You
> can do one of the following:
> - use your own timer (Boost.Asio offers one) and handle thread safety
> - have a look at Asynchronous. Sorry if it looks like advertising, but the
> library was written for this kind of things.
> >Thank you very much for helping,
> Unsubscribe & other changes: http://lists.boost.org/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk