/usr/include/boost/asio/detail/impl
NameSizeModeActions
buffer_sequence_adapter.ipp30960644editdlrm
descriptor_ops.ipp150910644editdlrm
dev_poll_reactor.hpp25870644editdlrm
dev_poll_reactor.ipp131380644editdlrm
epoll_reactor.hpp24390644editdlrm
epoll_reactor.ipp223720644editdlrm
eventfd_select_interrupter.ipp45980644editdlrm
handler_tracking.ipp117820644editdlrm
kqueue_reactor.hpp25900644editdlrm
kqueue_reactor.ipp170450644editdlrm
null_event.ipp19060644editdlrm
pipe_select_interrupter.ipp31760644editdlrm
posix_event.ipp17760644editdlrm
posix_mutex.ipp12350644editdlrm
posix_thread.ipp19640644editdlrm
posix_tss_ptr.ipp12610644editdlrm
reactive_descriptor_service.ipp63880644editdlrm
reactive_serial_port_service.ipp42780644editdlrm
reactive_socket_service_base.ipp88020644editdlrm
resolver_service_base.ipp38910644editdlrm
scheduler.ipp158920644editdlrm
select_reactor.hpp29850644editdlrm
select_reactor.ipp93520644editdlrm
service_registry.hpp26520644editdlrm
service_registry.ipp54620644editdlrm
signal_set_service.ipp203760644editdlrm
socket_ops.ipp1137980644editdlrm
socket_select_interrupter.ipp58580644editdlrm
strand_executor_service.hpp115700644editdlrm
strand_executor_service.ipp36370644editdlrm
strand_service.hpp35740644editdlrm
strand_service.ipp50370644editdlrm
throw_error.ipp12680644editdlrm
timer_queue_ptime.ipp24100644editdlrm
timer_queue_set.ipp23170644editdlrm
winrt_ssocket_service_base.ipp175130644editdlrm
winrt_timer_scheduler.hpp26640644editdlrm
winrt_timer_scheduler.ipp29620644editdlrm
winsock_init.ipp20500644editdlrm
win_event.ipp20680644editdlrm
win_iocp_handle_service.ipp143940644editdlrm
win_iocp_io_context.hpp30260644editdlrm
win_iocp_io_context.ipp166340644editdlrm
win_iocp_serial_port_service.ipp60210644editdlrm
win_iocp_socket_service_base.ipp250410644editdlrm
win_mutex.ipp22130644editdlrm
win_object_handle_service.ipp124950644editdlrm
win_static_mutex.ipp36360644editdlrm
win_thread.ipp41020644editdlrm
win_tss_ptr.ipp14480644editdlrm
Edit: /usr/include/boost/asio/detail/impl/strand_service.hpp (3574B)
// // detail/impl/strand_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_DETAIL_IMPL_STRAND_SERVICE_HPP #define BOOST_ASIO_DETAIL_IMPL_STRAND_SERVICE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include #include #include #include #include #include #include namespace boost { namespace asio { namespace detail { inline strand_service::strand_impl::strand_impl() : operation(&strand_service::do_complete), locked_(false) { } struct strand_service::on_dispatch_exit { io_context_impl* io_context_impl_; strand_impl* impl_; ~on_dispatch_exit() { impl_->mutex_.lock(); impl_->ready_queue_.push(impl_->waiting_queue_); bool more_handlers = impl_->locked_ = !impl_->ready_queue_.empty(); impl_->mutex_.unlock(); if (more_handlers) io_context_impl_->post_immediate_completion(impl_, false); } }; template void strand_service::dispatch(strand_service::implementation_type& impl, Handler& handler) { // If we are already in the strand then the handler can run immediately. if (call_stack::contains(impl)) { fenced_block b(fenced_block::full); boost_asio_handler_invoke_helpers::invoke(handler, handler); return; } // Allocate and construct an operation to wrap the handler. typedef completion_handler op; typename op::ptr p = { boost::asio::detail::addressof(handler), op::ptr::allocate(handler), 0 }; p.p = new (p.v) op(handler, io_context_.get_executor()); BOOST_ASIO_HANDLER_CREATION((this->context(), *p.p, "strand", impl, 0, "dispatch")); bool dispatch_immediately = do_dispatch(impl, p.p); operation* o = p.p; p.v = p.p = 0; if (dispatch_immediately) { // Indicate that this strand is executing on the current thread. call_stack::context ctx(impl); // Ensure the next handler, if any, is scheduled on block exit. on_dispatch_exit on_exit = { &io_context_impl_, impl }; (void)on_exit; op::do_complete(&io_context_impl_, o, boost::system::error_code(), 0); } } // Request the io_context to invoke the given handler and return immediately. template void strand_service::post(strand_service::implementation_type& impl, Handler& handler) { bool is_continuation = boost_asio_handler_cont_helpers::is_continuation(handler); // Allocate and construct an operation to wrap the handler. typedef completion_handler op; typename op::ptr p = { boost::asio::detail::addressof(handler), op::ptr::allocate(handler), 0 }; p.p = new (p.v) op(handler, io_context_.get_executor()); BOOST_ASIO_HANDLER_CREATION((this->context(), *p.p, "strand", impl, 0, "post")); do_post(impl, p.p, is_continuation); p.v = p.p = 0; } } // namespace detail } // namespace asio } // namespace boost #include #endif // BOOST_ASIO_DETAIL_IMPL_STRAND_SERVICE_HPP