| 84 | ) { } |
| 85 | |
| 86 | void wait ( |
| 87 | ) const |
| 88 | { |
| 89 | std::unique_lock<std::mutex> cs(m.cs, std::adopt_lock); |
| 90 | cv.wait(cs); |
| 91 | // Make sure we don't actually modify the mutex. Since the calling code will have locked |
| 92 | // it and it should remain locked. |
| 93 | cs.release(); |
| 94 | } |
| 95 | |
| 96 | bool wait_or_timeout ( |
| 97 | unsigned long milliseconds |