-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
I am trying to familiarize myself sc, however I keep ending up with issues.
I have multiple threads that generate events and I am trying to buffer the events in a std::queue and have a thread call process_event with whatever is in the queue.
//typedef
typedef boost::statechart::state_machine<SMVesselServer, SVesselServer>::event_base_type VSEvent;
--
//queue def
std::queue<std::shared_ptr<VSEvent>> events;
--
//enqueue function
void HandleEvent(std::shared_ptr<VSEvent> e);
Does this approach make sense at all - any references to thread safety would be great.
Besides, getting interactions with the outside world from the states seems non trivial. I have a static struct with thread safe getters and setters at the moment.
Metadata
Metadata
Assignees
Labels
No labels