File indexing completed on 2025-01-18 09:28:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_DETAIL_NULL_EVENT_HPP
0012 #define BOOST_ASIO_DETAIL_NULL_EVENT_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019 #include <boost/asio/detail/noncopyable.hpp>
0020
0021 #include <boost/asio/detail/push_options.hpp>
0022
0023 namespace boost {
0024 namespace asio {
0025 namespace detail {
0026
0027 class null_event
0028 : private noncopyable
0029 {
0030 public:
0031
0032 null_event()
0033 {
0034 }
0035
0036
0037 ~null_event()
0038 {
0039 }
0040
0041
0042 template <typename Lock>
0043 void signal(Lock&)
0044 {
0045 }
0046
0047
0048 template <typename Lock>
0049 void signal_all(Lock&)
0050 {
0051 }
0052
0053
0054 template <typename Lock>
0055 void unlock_and_signal_one(Lock&)
0056 {
0057 }
0058
0059
0060 template <typename Lock>
0061 void unlock_and_signal_one_for_destruction(Lock&)
0062 {
0063 }
0064
0065
0066 template <typename Lock>
0067 bool maybe_unlock_and_signal_one(Lock&)
0068 {
0069 return false;
0070 }
0071
0072
0073 template <typename Lock>
0074 void clear(Lock&)
0075 {
0076 }
0077
0078
0079 template <typename Lock>
0080 void wait(Lock&)
0081 {
0082 do_wait();
0083 }
0084
0085
0086 template <typename Lock>
0087 bool wait_for_usec(Lock&, long usec)
0088 {
0089 do_wait_for_usec(usec);
0090 return true;
0091 }
0092
0093 private:
0094 BOOST_ASIO_DECL static void do_wait();
0095 BOOST_ASIO_DECL static void do_wait_for_usec(long usec);
0096 };
0097
0098 }
0099 }
0100 }
0101
0102 #include <boost/asio/detail/pop_options.hpp>
0103
0104 #if defined(BOOST_ASIO_HEADER_ONLY)
0105 # include <boost/asio/detail/impl/null_event.ipp>
0106 #endif
0107
0108 #endif