Try condition_variable using C++Builder(C++11).
std::condition_variable is a class for waiting for thread execution until the condition is satisfied.
Used in combination with std::mutex.
I tried the wait() function in std::condition_variable.
This is combined with
Make mutex and condition_variable management class.
The created thread is waited using condition_variable.
Sleeping for 1 second immediately after passing Wait.
Then execution request is made to the next thread.
Thread creation function
It is a button event of C++Builder.
We create 10 threads, but they are all waited.
Thereafter, to perform one single thread start_and_join() function.
Threads are executed in an irregular way one by one.
Please login first in order for you to submit comments