Skip to content

Commit ab90437

Browse files
committed
Added a cleanup interface for waiter.
1 parent acea9d7 commit ab90437

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/libipc/waiter.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ class waiter {
5151
lock_.close();
5252
}
5353

54+
void clear() noexcept {
55+
cond_.clear();
56+
lock_.clear();
57+
}
58+
59+
static void clear_storage(char const *name) noexcept {
60+
ipc::sync::condition::clear_storage(name);
61+
ipc::sync::mutex::clear_storage(name);
62+
}
63+
5464
template <typename F>
5565
bool wait_if(F &&pred, std::uint64_t tm = ipc::invalid_value) noexcept {
5666
IPC_UNUSED_ std::lock_guard<ipc::sync::mutex> guard {lock_};

0 commit comments

Comments
 (0)