Stopping C++ 11 std::threads waiting on a std::condition_variable
No, there’s nothing wrong with your design, and it’s the normal approach taken for this sort of problem. It’s perfectly valid for you to have multiple conditions (eg anything on queue or program stopping) attached to a condition variable. The key thing is that the bits in the condition are checked for when the wait … Read more