Skip to content

multithreading with PEGTL #176

Answered by ColinH
Shaheen47 asked this question in Q&A
Discussion options

You must be logged in to vote

The PEGTL is completely thread agnostic, it shouldn't care about whatever it is that you're doing as long as you are respecting all the basic rules of multi-threaded programming.

If your concurrent queue blocks the producer on a condition variable when you try to push into a queue that is already full, and the consumer signals that variable when it takes something out of the queue/a full queue, you should get exactly the behaviour that you need without any additional effort.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by d-frey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #176 on December 09, 2020 09:17.