11 #ifndef ASIO_DETAIL_IMPL_STRAND_SERVICE_HPP 12 #define ASIO_DETAIL_IMPL_STRAND_SERVICE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 44 impl_->ready_queue_.
push(impl_->waiting_queue_);
45 bool more_handlers = impl_->locked_ = !impl_->ready_queue_.
empty();
49 io_service_->post_immediate_completion(impl_,
false);
53 template <
typename Handler>
67 typename op::ptr p = { asio::detail::addressof(handler),
69 sizeof(op), handler), 0 };
70 p.p =
new (p.v) op(handler);
74 bool dispatch_immediately = do_dispatch(impl, p.p);
78 if (dispatch_immediately)
93 template <
typename Handler>
102 typename op::ptr p = { asio::detail::addressof(handler),
104 sizeof(op), handler), 0 };
105 p.p =
new (p.v) op(handler);
109 do_post(impl, p.p, is_continuation);
118 #endif // ASIO_DETAIL_IMPL_STRAND_SERVICE_HPP
static void do_complete(io_service_impl *owner, operation *base, const asio::error_code &, std::size_t)
void post(implementation_type &impl, Handler &handler)
asio::basic_streambuf< Allocator > & b
class task_io_service io_service_impl
void dispatch(implementation_type &impl, Handler &handler)
void invoke(Function &function, Context &context)
bool is_continuation(Context &context)
Class to represent an error code value.
task_io_service_operation operation
io_service_impl * io_service_
void * allocate(std::size_t s, Handler &h)
#define ASIO_HANDLER_CREATION(args)