In particular, I am looking for a blocking queue. Is there such a thing in C++11? If not, what are my other options? I really don’t want to go down to the thread level myself anymore. Way too error-prone.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
According to Diego Dagum from Microsoft’s Visual C++ Team:
The Parallel Patterns Library (PPL) includes several containers that provide thread-safe access to their elements:
Some samples here.
Also interesting: http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html.