Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:41

0001 //
0002 // detail/null_reactor.hpp
0003 // ~~~~~~~~~~~~~~~~~~~~~~~
0004 //
0005 // Copyright (c) 2003-2023 Christopher M. Kohlhoff (chris at kohlhoff dot com)
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0008 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0009 //
0010 
0011 #ifndef BOOST_ASIO_DETAIL_NULL_REACTOR_HPP
0012 #define BOOST_ASIO_DETAIL_NULL_REACTOR_HPP
0013 
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
0017 
0018 #include <boost/asio/detail/config.hpp>
0019 
0020 #if defined(BOOST_ASIO_HAS_IOCP) \
0021   || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
0022   || defined(BOOST_ASIO_HAS_IO_URING_AS_DEFAULT)
0023 
0024 #include <boost/asio/detail/scheduler_operation.hpp>
0025 #include <boost/asio/detail/scheduler_task.hpp>
0026 #include <boost/asio/execution_context.hpp>
0027 
0028 #include <boost/asio/detail/push_options.hpp>
0029 
0030 namespace boost {
0031 namespace asio {
0032 namespace detail {
0033 
0034 class null_reactor
0035   : public execution_context_service_base<null_reactor>,
0036     public scheduler_task
0037 {
0038 public:
0039   struct per_descriptor_data
0040   {
0041   };
0042 
0043   // Constructor.
0044   null_reactor(boost::asio::execution_context& ctx)
0045     : execution_context_service_base<null_reactor>(ctx)
0046   {
0047   }
0048 
0049   // Destructor.
0050   ~null_reactor()
0051   {
0052   }
0053 
0054   // Initialise the task.
0055   void init_task()
0056   {
0057   }
0058 
0059   // Destroy all user-defined handler objects owned by the service.
0060   void shutdown()
0061   {
0062   }
0063 
0064   // No-op because should never be called.
0065   void run(long /*usec*/, op_queue<scheduler_operation>& /*ops*/)
0066   {
0067   }
0068 
0069   // No-op.
0070   void interrupt()
0071   {
0072   }
0073 };
0074 
0075 } // namespace detail
0076 } // namespace asio
0077 } // namespace boost
0078 
0079 #include <boost/asio/detail/pop_options.hpp>
0080 
0081 #endif // defined(BOOST_ASIO_HAS_IOCP)
0082        //   || defined(BOOST_ASIO_WINDOWS_RUNTIME)
0083        //   || defined(BOOST_ASIO_HAS_IO_URING_AS_DEFAULT)
0084 
0085 #endif // BOOST_ASIO_DETAIL_NULL_REACTOR_HPP