wait_if should return a value

This commit is contained in:
mutouyun 2019-02-12 23:31:02 +08:00
parent a6d88a1208
commit 19d1724188

View File

@ -176,8 +176,7 @@ public:
IPC_UNUSED_ auto guard = unique_ptr(&counter_, [](decltype(counter_)* c) { IPC_UNUSED_ auto guard = unique_ptr(&counter_, [](decltype(counter_)* c) {
c->fetch_sub(1, std::memory_order_release); c->fetch_sub(1, std::memory_order_release);
}); });
sem_.wait_if(std::forward<F>(pred)); return sem_.wait_if(std::forward<F>(pred));
return true;
} }
void notify(handle_t h) { void notify(handle_t h) {