mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
Added a cleanup interface for waiter.
This commit is contained in:
parent
acea9d74da
commit
ab90437e44
@ -51,6 +51,16 @@ public:
|
|||||||
lock_.close();
|
lock_.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear() noexcept {
|
||||||
|
cond_.clear();
|
||||||
|
lock_.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void clear_storage(char const *name) noexcept {
|
||||||
|
ipc::sync::condition::clear_storage(name);
|
||||||
|
ipc::sync::mutex::clear_storage(name);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename F>
|
template <typename F>
|
||||||
bool wait_if(F &&pred, std::uint64_t tm = ipc::invalid_value) noexcept {
|
bool wait_if(F &&pred, std::uint64_t tm = ipc::invalid_value) noexcept {
|
||||||
IPC_UNUSED_ std::lock_guard<ipc::sync::mutex> guard {lock_};
|
IPC_UNUSED_ std::lock_guard<ipc::sync::mutex> guard {lock_};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user