11 #ifndef ASIO_DETAIL_STRAND_SERVICE_HPP 12 #define ASIO_DETAIL_STRAND_SERVICE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/config.hpp" 19 #include "asio/io_context.hpp" 20 #include "asio/detail/mutex.hpp" 21 #include "asio/detail/op_queue.hpp" 22 #include "asio/detail/operation.hpp" 23 #include "asio/detail/scoped_ptr.hpp" 25 #include "asio/detail/push_options.hpp" 84 ASIO_DECL
void construct(implementation_type& impl);
87 template <
typename Handler>
88 void dispatch(implementation_type& impl, Handler& handler);
91 template <
typename Handler>
92 void post(implementation_type& impl, Handler& handler);
95 ASIO_DECL
bool running_in_this_thread(
96 const implementation_type& impl)
const;
101 ASIO_DECL
bool do_dispatch(implementation_type& impl, operation* op);
104 ASIO_DECL
void do_post(implementation_type& impl,
105 operation* op,
bool is_continuation);
107 ASIO_DECL
static void do_complete(
void* owner,
109 std::size_t bytes_transferred);
112 io_context& io_context_;
121 #if defined(ASIO_STRAND_IMPLEMENTATIONS) 122 enum { num_implementations = ASIO_STRAND_IMPLEMENTATIONS };
123 #else // defined(ASIO_STRAND_IMPLEMENTATIONS) 124 enum { num_implementations = 193 };
125 #endif // defined(ASIO_STRAND_IMPLEMENTATIONS) 138 #include "asio/detail/pop_options.hpp" 140 #include "asio/detail/impl/strand_service.hpp" 141 #if defined(ASIO_HEADER_ONLY) 142 # include "asio/detail/impl/strand_service.ipp" 143 #endif // defined(ASIO_HEADER_ONLY) 145 #endif // ASIO_DETAIL_STRAND_SERVICE_HPP Definition: null_mutex.hpp:30
ASIO_DECL void shutdown()
Destroy all user-defined handler objects owned by the service.
Definition: strand_service.ipp:53
Definition: strand_service.hpp:44
Definition: io_context.hpp:1237
Definition: strand_service.hpp:36
Provides core I/O functionality.
Definition: io_context.hpp:211
Definition: strand_service.hpp:31
Definition: strand_service.ipp:27
Class to represent an error code value.
Definition: error_code.hpp:80
Definition: scoped_ptr.hpp:26
Definition: any_io_executor.hpp:28
Definition: scheduler.hpp:38