python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How to wake up multiple threads using condition variable
I want to run multiple threads every 100ms. In order to achieve that I thought of introducing std::mutex and std::condition_variable. The problem I'm facing is on what basis the threads should go into...
Harry
Votes: 0
Answers: 1
`std::condition_var::notify_all` deadlocks
I have cpp code where one thread produces, pushing data into a queue and another consumes it before passing it to other libraries for processing.
std::mutex lock;
std::condition_variable new_data;
std...
Nescio
Votes: 0
Answers: 2