annotate DEPENDENCIES/generic/include/boost/asio/detail/null_event.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 //
Chris@16 2 // detail/null_event.hpp
Chris@16 3 // ~~~~~~~~~~~~~~~~~~~~~
Chris@16 4 //
Chris@101 5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
Chris@16 6 //
Chris@16 7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 9 //
Chris@16 10
Chris@16 11 #ifndef BOOST_ASIO_DETAIL_NULL_EVENT_HPP
Chris@16 12 #define BOOST_ASIO_DETAIL_NULL_EVENT_HPP
Chris@16 13
Chris@16 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
Chris@16 15 # pragma once
Chris@16 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
Chris@16 17
Chris@16 18 #include <boost/asio/detail/config.hpp>
Chris@16 19
Chris@16 20 #if !defined(BOOST_ASIO_HAS_THREADS)
Chris@16 21
Chris@16 22 #include <boost/asio/detail/noncopyable.hpp>
Chris@16 23
Chris@16 24 #include <boost/asio/detail/push_options.hpp>
Chris@16 25
Chris@16 26 namespace boost {
Chris@16 27 namespace asio {
Chris@16 28 namespace detail {
Chris@16 29
Chris@16 30 class null_event
Chris@16 31 : private noncopyable
Chris@16 32 {
Chris@16 33 public:
Chris@16 34 // Constructor.
Chris@16 35 null_event()
Chris@16 36 {
Chris@16 37 }
Chris@16 38
Chris@16 39 // Destructor.
Chris@16 40 ~null_event()
Chris@16 41 {
Chris@16 42 }
Chris@16 43
Chris@101 44 // Signal the event. (Retained for backward compatibility.)
Chris@16 45 template <typename Lock>
Chris@16 46 void signal(Lock&)
Chris@16 47 {
Chris@16 48 }
Chris@16 49
Chris@101 50 // Signal all waiters.
Chris@16 51 template <typename Lock>
Chris@101 52 void signal_all(Lock&)
Chris@16 53 {
Chris@16 54 }
Chris@16 55
Chris@101 56 // Unlock the mutex and signal one waiter.
Chris@101 57 template <typename Lock>
Chris@101 58 void unlock_and_signal_one(Lock&)
Chris@101 59 {
Chris@101 60 }
Chris@101 61
Chris@101 62 // If there's a waiter, unlock the mutex and signal it.
Chris@101 63 template <typename Lock>
Chris@101 64 bool maybe_unlock_and_signal_one(Lock&)
Chris@101 65 {
Chris@101 66 return false;
Chris@101 67 }
Chris@101 68
Chris@16 69 // Reset the event.
Chris@16 70 template <typename Lock>
Chris@16 71 void clear(Lock&)
Chris@16 72 {
Chris@16 73 }
Chris@16 74
Chris@16 75 // Wait for the event to become signalled.
Chris@16 76 template <typename Lock>
Chris@16 77 void wait(Lock&)
Chris@16 78 {
Chris@16 79 }
Chris@16 80 };
Chris@16 81
Chris@16 82 } // namespace detail
Chris@16 83 } // namespace asio
Chris@16 84 } // namespace boost
Chris@16 85
Chris@16 86 #include <boost/asio/detail/pop_options.hpp>
Chris@16 87
Chris@16 88 #endif // !defined(BOOST_ASIO_HAS_THREADS)
Chris@16 89
Chris@16 90 #endif // BOOST_ASIO_DETAIL_NULL_EVENT_HPP