Added clear_storage for quieue

This commit is contained in:
mutouyun 2024-11-30 17:56:07 +08:00
parent ab90437e44
commit 17dcde92bf
2 changed files with 6 additions and 2 deletions

View File

@ -59,6 +59,10 @@ public:
elems_h_.clear();
}
static void clear_storage(char const *name) noexcept {
shm::handle::clear_storage(name);
}
bool connected() const noexcept {
return connected_ != 0;
}

View File

@ -57,8 +57,8 @@ public:
}
static void clear_storage(char const *name) noexcept {
ipc::sync::condition::clear_storage(name);
ipc::sync::mutex::clear_storage(name);
ipc::sync::condition::clear_storage((std::string{name} + "_WAITER_COND_").c_str());
ipc::sync::mutex::clear_storage((std::string{name} + "_WAITER_LOCK_").c_str());
}
template <typename F>