mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2026-02-05 17:29:49 +08:00
validate close in waiter
This commit is contained in:
parent
ed8b1fd608
commit
b8f5e2ba6f
@ -42,8 +42,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void close() noexcept {
|
void close() noexcept {
|
||||||
// cond_.close();
|
cond_.close();
|
||||||
// lock_.close();
|
lock_.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename F>
|
template <typename F>
|
||||||
@ -64,6 +64,9 @@ public:
|
|||||||
std::lock_guard<ipc::sync::mutex>{lock_}; // barrier
|
std::lock_guard<ipc::sync::mutex>{lock_}; // barrier
|
||||||
return cond_.broadcast();
|
return cond_.broadcast();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void quit_waiting() {
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|||||||
@ -34,4 +34,7 @@ TEST(Waiter, broadcast) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(Waiter, quit_waiting) {
|
||||||
|
}
|
||||||
|
|
||||||
} // internal-linkage
|
} // internal-linkage
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user