Buffering of events - to make it threadsafe
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
The issue centers on the std::queue buffer, HandleEvent, process_event, and the static thread-safe state-access struct. Start by reviewing the project's event-processing and threading guidance; done should be an agreed, validated approach for concurrent event delivery and interactions with the outside world.
Written by the indexing model from the issue text.
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.
- Dominant language
- C++
- Stars
- 32
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/statechart
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
boostorg/statechart#20 · 1 comment · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
boostorg/statechart#25 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
boostorg/statechart#24 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
boostorg/statechart#23 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
boostorg/statechart#22 · 6 comments ·
All issues in boostorg/statechart
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·