summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/asio/detail/null_event.hpp')
-rw-r--r--3rdParty/Boost/src/boost/asio/detail/null_event.hpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/3rdParty/Boost/src/boost/asio/detail/null_event.hpp b/3rdParty/Boost/src/boost/asio/detail/null_event.hpp
index 1130d18..2e87844 100644
--- a/3rdParty/Boost/src/boost/asio/detail/null_event.hpp
+++ b/3rdParty/Boost/src/boost/asio/detail/null_event.hpp
@@ -2,7 +2,7 @@
// detail/null_event.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2014 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)
@@ -17,7 +17,7 @@
#include <boost/asio/detail/config.hpp>
-#if !defined(BOOST_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_THREADS)
+#if !defined(BOOST_ASIO_HAS_THREADS)
#include <boost/asio/detail/noncopyable.hpp>
@@ -41,18 +41,31 @@ public:
{
}
- // Signal the event.
+ // Signal the event. (Retained for backward compatibility.)
template <typename Lock>
void signal(Lock&)
{
}
- // Signal the event and unlock the mutex.
+ // Signal all waiters.
template <typename Lock>
- void signal_and_unlock(Lock&)
+ void signal_all(Lock&)
{
}
+ // Unlock the mutex and signal one waiter.
+ template <typename Lock>
+ void unlock_and_signal_one(Lock&)
+ {
+ }
+
+ // If there's a waiter, unlock the mutex and signal it.
+ template <typename Lock>
+ bool maybe_unlock_and_signal_one(Lock&)
+ {
+ return false;
+ }
+
// Reset the event.
template <typename Lock>
void clear(Lock&)
@@ -72,6 +85,6 @@ public:
#include <boost/asio/detail/pop_options.hpp>
-#endif // !defined(BOOST_HAS_THREADS) || defined(BOOST_ASIO_DISABLE_THREADS)
+#endif // !defined(BOOST_ASIO_HAS_THREADS)
#endif // BOOST_ASIO_DETAIL_NULL_EVENT_HPP