1 | #include "baz.h" |
---|---|
2 | |
3 | #include <math.h> |
4 | |
5 | int baz(int &j, std::mutex &mutex, std::condition_variable &cv) { |
6 | std::unique_lock<std::mutex> lock(mutex); |
7 | cv.wait(lock&: lock, p: [&j] { return j == 42 * 42; }); |
8 | int k = sqrt(x: j); |
9 | return k; // break here |
10 | } |
11 |