| 114 | } |
| 115 | FrozenCleanupCheck() = default; |
| 116 | ~FrozenCleanupCheck() |
| 117 | { |
| 118 | if (should_freeze) { |
| 119 | std::unique_lock<std::mutex> l(m); |
| 120 | nFrozen.store(1, std::memory_order_relaxed); |
| 121 | cv.notify_one(); |
| 122 | cv.wait(l, []{ return nFrozen.load(std::memory_order_relaxed) == 0;}); |
| 123 | } |
| 124 | } |
| 125 | FrozenCleanupCheck(FrozenCleanupCheck&& other) noexcept |
| 126 | { |
| 127 | should_freeze = other.should_freeze; |