summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp')
-rw-r--r--3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp b/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp
index 7ce806a2358..bb5c524b0c7 100644
--- a/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp
+++ b/3rdparty/asio/include/asio/detail/conditionally_enabled_event.hpp
@@ -2,7 +2,7 @@
// detail/conditionally_enabled_event.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -64,6 +64,14 @@ public:
event_.unlock_and_signal_one(lock);
}
+ // Unlock the mutex and signal one waiter who may destroy us.
+ void unlock_and_signal_one_for_destruction(
+ conditionally_enabled_mutex::scoped_lock& lock)
+ {
+ if (lock.mutex_.enabled_)
+ event_.unlock_and_signal_one(lock);
+ }
+
// If there's a waiter, unlock the mutex and signal it.
bool maybe_unlock_and_signal_one(
conditionally_enabled_mutex::scoped_lock& lock)