$search
00001 // 00002 // null_event.hpp 00003 // ~~~~~~~~~~~~~~ 00004 // 00005 // Copyright (c) 2003-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) 00006 // 00007 // Distributed under the Boost Software License, Version 1.0. (See accompanying 00008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 00009 // 00010 00011 #ifndef ASIO_DETAIL_NULL_EVENT_HPP 00012 #define ASIO_DETAIL_NULL_EVENT_HPP 00013 00014 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 00015 # pragma once 00016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 00017 00018 #include "asio/detail/push_options.hpp" 00019 00020 #include "asio/detail/push_options.hpp" 00021 #include <boost/config.hpp> 00022 #include "asio/detail/pop_options.hpp" 00023 00024 #if !defined(BOOST_HAS_THREADS) 00025 00026 #include "asio/detail/noncopyable.hpp" 00027 00028 namespace asio { 00029 namespace detail { 00030 00031 class null_event 00032 : private noncopyable 00033 { 00034 public: 00035 // Constructor. 00036 null_event() 00037 { 00038 } 00039 00040 // Destructor. 00041 ~null_event() 00042 { 00043 } 00044 00045 // Signal the event. 00046 template <typename Lock> 00047 void signal(Lock&) 00048 { 00049 } 00050 00051 // Reset the event. 00052 template <typename Lock> 00053 void clear(Lock&) 00054 { 00055 } 00056 00057 // Wait for the event to become signalled. 00058 template <typename Lock> 00059 void wait(Lock&) 00060 { 00061 } 00062 }; 00063 00064 } // namespace detail 00065 } // namespace asio 00066 00067 #endif // !defined(BOOST_HAS_THREADS) 00068 00069 #include "asio/detail/pop_options.hpp" 00070 00071 #endif // ASIO_DETAIL_NULL_EVENT_HPP