cond_.notify_one();
}
+ // Unlock the mutex and signal one waiter who may destroy us.
+ template <typename Lock>
+ void unlock_and_signal_one_for_destruction(Lock& lock)
+ {
+ BOOST_ASIO_ASSERT(lock.locked());
+ state_ |= 1;
+ bool have_waiters = (state_ > 1);
+ if (have_waiters)
+ cond_.notify_one();
+ lock.unlock();
+ }
+
// If there's a waiter, unlock the mutex and signal it.
template <typename Lock>
bool maybe_unlock_and_signal_one(Lock& lock)