Boost logo

Boost Users :

From: Igor R (boost.lists_at_[hidden])
Date: 2008-08-02 14:40:57


> You can't, see above. Two asynchronous state machine must only exchange data in
> a, well, asynchronous manner. That is, have the requesting state machine post
> an event to the other FSM, which in turn posts the requested data in an event
> back to the requesting FSM. Of course you'll have to be careful to always
> *copy* the data and never let both state machines access the same data through
> e.g. pointers.

Lets assume, this "shared data" is defined externally to the FSMs, and
then a ptr to the data is passed to them all (in the constructors or
by means of an event). If this data is accessed in a thread-safe
manner, then such a design doesn't seem to be dangerous, does it?

Thanks,

Igor'.


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