2 // detail/null_event.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~
5 // Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
11 #ifndef BOOST_ASIO_DETAIL_NULL_EVENT_HPP
12 #define BOOST_ASIO_DETAIL_NULL_EVENT_HPP
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
18 #include <boost/asio/detail/config.hpp>
19 #include <boost/asio/detail/noncopyable.hpp>
21 #include <boost/asio/detail/push_options.hpp>
41 // Signal the event. (Retained for backward compatibility.)
42 template <typename Lock>
47 // Signal all waiters.
48 template <typename Lock>
49 void signal_all(Lock&)
53 // Unlock the mutex and signal one waiter.
54 template <typename Lock>
55 void unlock_and_signal_one(Lock&)
59 // If there's a waiter, unlock the mutex and signal it.
60 template <typename Lock>
61 bool maybe_unlock_and_signal_one(Lock&)
67 template <typename Lock>
72 // Wait for the event to become signalled.
73 template <typename Lock>
79 // Timed wait for the event to become signalled.
80 template <typename Lock>
81 bool wait_for_usec(Lock&, long usec)
83 do_wait_for_usec(usec);
88 BOOST_ASIO_DECL static void do_wait();
89 BOOST_ASIO_DECL static void do_wait_for_usec(long usec);
96 #include <boost/asio/detail/pop_options.hpp>
98 #if defined(BOOST_ASIO_HEADER_ONLY)
99 # include <boost/asio/detail/impl/null_event.ipp>
100 #endif // defined(BOOST_ASIO_HEADER_ONLY)
102 #endif // BOOST_ASIO_DETAIL_NULL_EVENT_HPP