There should be a class that unites the condition and mutex.
There should be a class that unites the condition and mutex.