Vuo 2.4.4
Loading...
Searching...
No Matches
VuoThreadUtilities.cc
Go to the documentation of this file.
1
10#include "VuoThreadUtilities.hh"
11
16 count(1)
17{
18}
19
24{
25 std::unique_lock<std::mutex> lock(mtx);
26 cv.wait(lock, [this](){ return count > 0; });
27 --count;
28}
29
34{
35 std::unique_lock<std::mutex> lock(mtx);
36 count++;
37 lock.unlock();
38 cv.notify_one();
39}