Event driven state machine + threads: how?

I would like to model an event-driven state machine in C, as suggested here: http://en.wikipedia.org/wiki/Event-driven_finite_state_machine

But I would also like for the "external" events to be processed in different threads.

Can I find such code somewhere? Or tips?

+5
source share
2 answers

Message queues are a way to solve your problem.

If you want to feed your state machine with external events from other threads, they can write these events to the message queue, which will be considered by your state machine.

, , , , MQ.

, . , , , : , , ...

+6

, Quantum Framework - , ? . http://state-machine.com/. , linux windows.

+5
source

All Articles