]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/asio/detail/null_reactor.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / asio / detail / null_reactor.hpp
1 //
2 // detail/null_reactor.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
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)
9 //
10
11 #ifndef BOOST_ASIO_DETAIL_NULL_REACTOR_HPP
12 #define BOOST_ASIO_DETAIL_NULL_REACTOR_HPP
13
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18 #include <boost/asio/detail/config.hpp>
19
20 #if defined(BOOST_ASIO_HAS_IOCP) \
21 || defined(BOOST_ASIO_WINDOWS_RUNTIME) \
22 || defined(BOOST_ASIO_HAS_IO_URING_AS_DEFAULT)
23
24 #include <boost/asio/detail/scheduler_operation.hpp>
25 #include <boost/asio/detail/scheduler_task.hpp>
26 #include <boost/asio/execution_context.hpp>
27
28 #include <boost/asio/detail/push_options.hpp>
29
30 namespace boost {
31 namespace asio {
32 namespace detail {
33
34 class null_reactor
35 : public execution_context_service_base<null_reactor>,
36 public scheduler_task
37 {
38 public:
39 struct per_descriptor_data
40 {
41 };
42
43 // Constructor.
44 null_reactor(boost::asio::execution_context& ctx)
45 : execution_context_service_base<null_reactor>(ctx)
46 {
47 }
48
49 // Destructor.
50 ~null_reactor()
51 {
52 }
53
54 // Initialise the task.
55 void init_task()
56 {
57 }
58
59 // Destroy all user-defined handler objects owned by the service.
60 void shutdown()
61 {
62 }
63
64 // No-op because should never be called.
65 void run(long /*usec*/, op_queue<scheduler_operation>& /*ops*/)
66 {
67 }
68
69 // No-op.
70 void interrupt()
71 {
72 }
73 };
74
75 } // namespace detail
76 } // namespace asio
77 } // namespace boost
78
79 #include <boost/asio/detail/pop_options.hpp>
80
81 #endif // defined(BOOST_ASIO_HAS_IOCP)
82 // || defined(BOOST_ASIO_WINDOWS_RUNTIME)
83 // || defined(BOOST_ASIO_HAS_IO_URING_AS_DEFAULT)
84
85 #endif // BOOST_ASIO_DETAIL_NULL_REACTOR_HPP