/usr/include/boost/asio/detail
NameSizeModeActions
impl/-0755rm
array.hpp10010644editdlrm
array_fwd.hpp9500644editdlrm
assert.hpp9680644editdlrm
atomic_count.hpp19550644editdlrm
base_from_completion_cond.hpp17950644editdlrm
bind_handler.hpp289360644editdlrm
blocking_executor_op.hpp28230644editdlrm
buffered_stream_storage.hpp29870644editdlrm
buffer_resize_guard.hpp15930644editdlrm
buffer_sequence_adapter.hpp155820644editdlrm
bulk_executor_op.hpp27850644editdlrm
call_stack.hpp30030644editdlrm
chrono.hpp20810644editdlrm
chrono_time_traits.hpp44690644editdlrm
completion_handler.hpp28320644editdlrm
concurrency_hint.hpp40620644editdlrm
conditionally_enabled_event.hpp31240644editdlrm
conditionally_enabled_mutex.hpp31260644editdlrm
config.hpp766670644editdlrm
consuming_buffers.hpp106310644editdlrm
cstddef.hpp8160644editdlrm
cstdint.hpp15580644editdlrm
date_time_fwd.hpp7920644editdlrm
deadline_timer_service.hpp92410644editdlrm
dependent_type.hpp8910644editdlrm
descriptor_ops.hpp42440644editdlrm
descriptor_read_op.hpp47980644editdlrm
descriptor_write_op.hpp48010644editdlrm
dev_poll_reactor.hpp80390644editdlrm
epoll_reactor.hpp94670644editdlrm
event.hpp13640644editdlrm
eventfd_select_interrupter.hpp25240644editdlrm
executor_function.hpp48570644editdlrm
executor_op.hpp26050644editdlrm
fd_set_adapter.hpp10640644editdlrm
fenced_block.hpp30660644editdlrm
functional.hpp10140644editdlrm
future.hpp12410644editdlrm
gcc_arm_fenced_block.hpp22380644editdlrm
gcc_hppa_fenced_block.hpp15600644editdlrm
gcc_sync_fenced_block.hpp16790644editdlrm
gcc_x86_fenced_block.hpp24600644editdlrm
global.hpp13970644editdlrm
handler_alloc_helpers.hpp82360644editdlrm
handler_cont_helpers.hpp13640644editdlrm
handler_invoke_helpers.hpp27150644editdlrm
handler_tracking.hpp91820644editdlrm
handler_type_requirements.hpp203510644editdlrm
handler_work.hpp123020644editdlrm
hash_map.hpp83430644editdlrm
io_control.hpp18830644editdlrm
io_object_impl.hpp50180644editdlrm
is_buffer_sequence.hpp79530644editdlrm
is_executor.hpp30330644editdlrm
keyword_tss_ptr.hpp14250644editdlrm
kqueue_reactor.hpp82770644editdlrm
limits.hpp7340644editdlrm
local_free_on_block_exit.hpp14700644editdlrm
macos_fenced_block.hpp13800644editdlrm
memory.hpp21030644editdlrm
mutex.hpp13510644editdlrm
noncopyable.hpp10000644editdlrm
non_const_lvalue.hpp15060644editdlrm
null_event.hpp21970644editdlrm
null_fenced_block.hpp10440644editdlrm
null_global.hpp12950644editdlrm
null_mutex.hpp12550644editdlrm
null_reactor.hpp15630644editdlrm
null_signal_blocker.hpp16270644editdlrm
null_socket_service.hpp172830644editdlrm
null_static_mutex.hpp12590644editdlrm
null_thread.hpp14420644editdlrm
null_tss_ptr.hpp12720644editdlrm
object_pool.hpp35000644editdlrm
old_win_sdk_compat.hpp44780644editdlrm
operation.hpp9630644editdlrm
op_queue.hpp33130644editdlrm
pipe_select_interrupter.hpp26030644editdlrm
pop_options.hpp28770644editdlrm
posix_event.hpp45480644editdlrm
posix_fd_set_adapter.hpp29920644editdlrm
posix_global.hpp18070644editdlrm
posix_mutex.hpp16850644editdlrm
posix_signal_blocker.hpp19750644editdlrm
posix_static_mutex.hpp14670644editdlrm
posix_thread.hpp21870644editdlrm
posix_tss_ptr.hpp18000644editdlrm
push_options.hpp46790644editdlrm
reactive_descriptor_service.hpp145070644editdlrm
reactive_null_buffers_op.hpp33000644editdlrm
reactive_serial_port_service.hpp83140644editdlrm
reactive_socket_accept_op.hpp83220644editdlrm
reactive_socket_connect_op.hpp40100644editdlrm
reactive_socket_recvfrom_op.hpp56600644editdlrm
reactive_socket_recvmsg_op.hpp50120644editdlrm
reactive_socket_recv_op.hpp54330644editdlrm
reactive_socket_sendto_op.hpp53620644editdlrm
reactive_socket_send_op.hpp55300644editdlrm
reactive_socket_service.hpp186530644editdlrm
reactive_socket_service_base.hpp196810644editdlrm
reactive_wait_op.hpp31530644editdlrm
reactor.hpp10030644editdlrm
reactor_fwd.hpp11550644editdlrm
reactor_op.hpp17630644editdlrm
reactor_op_queue.hpp49790644editdlrm
recycling_allocator.hpp24670644editdlrm
regex_fwd.hpp8460644editdlrm
resolver_service.hpp48060644editdlrm
resolver_service_base.hpp43920644editdlrm
resolve_endpoint_op.hpp49000644editdlrm
resolve_op.hpp10900644editdlrm
resolve_query_op.hpp50340644editdlrm
scheduler.hpp76090644editdlrm
scheduler_operation.hpp19220644editdlrm
scheduler_thread_info.hpp10790644editdlrm
scoped_lock.hpp19420644editdlrm
scoped_ptr.hpp14480644editdlrm
select_interrupter.hpp14260644editdlrm
select_reactor.hpp88130644editdlrm
service_registry.hpp56450644editdlrm
signal_blocker.hpp13820644editdlrm
signal_handler.hpp29310644editdlrm
signal_init.hpp10700644editdlrm
signal_op.hpp11460644editdlrm
signal_set_service.hpp70180644editdlrm
socket_holder.hpp21480644editdlrm
socket_ops.hpp139170644editdlrm
socket_option.hpp64100644editdlrm
socket_select_interrupter.hpp26200644editdlrm
socket_types.hpp161730644editdlrm
solaris_fenced_block.hpp13380644editdlrm
source_location.hpp14600644editdlrm
static_mutex.hpp17450644editdlrm
std_event.hpp40290644editdlrm
std_fenced_block.hpp14080644editdlrm
std_global.hpp15680644editdlrm
std_mutex.hpp14040644editdlrm
std_static_mutex.hpp15860644editdlrm
std_thread.hpp14250644editdlrm
strand_executor_service.hpp61100644editdlrm
strand_service.hpp48960644editdlrm
string_view.hpp15740644editdlrm
thread.hpp16580644editdlrm
thread_context.hpp11350644editdlrm
thread_group.hpp19930644editdlrm
thread_info_base.hpp49790644editdlrm
throw_error.hpp13770644editdlrm
throw_exception.hpp15120644editdlrm
timer_queue.hpp98730644editdlrm
timer_queue_base.hpp17540644editdlrm
timer_queue_ptime.hpp31320644editdlrm
timer_queue_set.hpp18050644editdlrm
timer_scheduler.hpp11570644editdlrm
timer_scheduler_fwd.hpp12250644editdlrm
tss_ptr.hpp18830644editdlrm
type_traits.hpp50700644editdlrm
variadic_templates.hpp132290644editdlrm
wait_handler.hpp28640644editdlrm
wait_op.hpp10210644editdlrm
winapp_thread.hpp27400644editdlrm
wince_thread.hpp26830644editdlrm
winrt_async_manager.hpp90240644editdlrm
winrt_async_op.hpp14870644editdlrm
winrt_resolver_service.hpp63020644editdlrm
winrt_resolve_op.hpp40620644editdlrm
winrt_socket_connect_op.hpp32370644editdlrm
winrt_socket_recv_op.hpp40420644editdlrm
winrt_socket_send_op.hpp36770644editdlrm
winrt_ssocket_service.hpp74550644editdlrm
winrt_ssocket_service_base.hpp128700644editdlrm
winrt_timer_scheduler.hpp48390644editdlrm
winrt_utils.hpp27600644editdlrm
winsock_init.hpp32320644editdlrm
win_event.hpp39360644editdlrm
win_fd_set_adapter.hpp39110644editdlrm
win_fenced_block.hpp21380644editdlrm
win_global.hpp17900644editdlrm
win_iocp_handle_read_op.hpp39560644editdlrm
win_iocp_handle_service.hpp129000644editdlrm
win_iocp_handle_write_op.hpp37580644editdlrm
win_iocp_io_context.hpp117470644editdlrm
win_iocp_null_buffers_op.hpp40980644editdlrm
win_iocp_operation.hpp21870644editdlrm
win_iocp_overlapped_op.hpp31860644editdlrm
win_iocp_overlapped_ptr.hpp44180644editdlrm
win_iocp_serial_port_service.hpp79810644editdlrm
win_iocp_socket_accept_op.hpp102100644editdlrm
win_iocp_socket_connect_op.hpp41460644editdlrm
win_iocp_socket_recvfrom_op.hpp43940644editdlrm
win_iocp_socket_recvmsg_op.hpp42110644editdlrm
win_iocp_socket_recv_op.hpp42320644editdlrm
win_iocp_socket_send_op.hpp39750644editdlrm
win_iocp_socket_service.hpp202090644editdlrm
win_iocp_socket_service_base.hpp234930644editdlrm
win_iocp_thread_info.hpp9030644editdlrm
win_iocp_wait_op.hpp40160644editdlrm
win_mutex.hpp18320644editdlrm
win_object_handle_service.hpp64010644editdlrm
win_static_mutex.hpp19370644editdlrm
win_thread.hpp32330644editdlrm
win_tss_ptr.hpp17440644editdlrm
work_dispatcher.hpp41110644editdlrm
wrapped_handler.hpp98820644editdlrm
Edit: /usr/include/boost/asio/detail/handler_work.hpp (12302B)
// // detail/handler_work.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_HANDLER_WORK_HPP #define BOOST_ASIO_DETAIL_HANDLER_WORK_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace asio { class executor; class io_context; namespace execution { #if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) template class any_executor; #else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) template class any_executor; #endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) } // namespace execution namespace detail { template class handler_work_base { public: explicit handler_work_base(const Executor& ex) BOOST_ASIO_NOEXCEPT : executor_(boost::asio::prefer(ex, execution::outstanding_work.tracked)) { } template handler_work_base(const Executor& ex, const OtherExecutor&) BOOST_ASIO_NOEXCEPT : executor_(boost::asio::prefer(ex, execution::outstanding_work.tracked)) { } handler_work_base(const handler_work_base& other) BOOST_ASIO_NOEXCEPT : executor_(other.executor_) { } #if defined(BOOST_ASIO_HAS_MOVE) handler_work_base(handler_work_base&& other) BOOST_ASIO_NOEXCEPT : executor_(BOOST_ASIO_MOVE_CAST(executor_type)(other.executor_)) { } #endif // defined(BOOST_ASIO_HAS_MOVE) bool owns_work() const BOOST_ASIO_NOEXCEPT { return true; } template void dispatch(Function& function, Handler& handler) { execution::execute( boost::asio::prefer(executor_, execution::blocking.possibly, execution::allocator((get_associated_allocator)(handler))), BOOST_ASIO_MOVE_CAST(Function)(function)); } private: typedef typename decay< typename prefer_result::type >::type executor_type; executor_type executor_; }; template class handler_work_base::value && (!is_same::value || !is_same::value) >::type> { public: explicit handler_work_base(const Executor& ex) BOOST_ASIO_NOEXCEPT : executor_(ex), owns_work_(true) { executor_.on_work_started(); } handler_work_base(const Executor& ex, const Executor& candidate) BOOST_ASIO_NOEXCEPT : executor_(ex), owns_work_(ex != candidate) { if (owns_work_) executor_.on_work_started(); } template handler_work_base(const Executor& ex, const OtherExecutor&) BOOST_ASIO_NOEXCEPT : executor_(ex), owns_work_(true) { executor_.on_work_started(); } handler_work_base(const handler_work_base& other) BOOST_ASIO_NOEXCEPT : executor_(other.executor_), owns_work_(other.owns_work_) { if (owns_work_) executor_.on_work_started(); } #if defined(BOOST_ASIO_HAS_MOVE) handler_work_base(handler_work_base&& other) BOOST_ASIO_NOEXCEPT : executor_(BOOST_ASIO_MOVE_CAST(Executor)(other.executor_)), owns_work_(other.owns_work_) { other.owns_work_ = false; } #endif // defined(BOOST_ASIO_HAS_MOVE) ~handler_work_base() { if (owns_work_) executor_.on_work_finished(); } bool owns_work() const BOOST_ASIO_NOEXCEPT { return owns_work_; } template void dispatch(Function& function, Handler& handler) { executor_.dispatch(BOOST_ASIO_MOVE_CAST(Function)(function), boost::asio::get_associated_allocator(handler)); } private: Executor executor_; bool owns_work_; }; template class handler_work_base::value >::type> { public: explicit handler_work_base(const Executor&) { } bool owns_work() const BOOST_ASIO_NOEXCEPT { return false; } template void dispatch(Function& function, Handler& handler) { // When using a native implementation, I/O completion handlers are // already dispatched according to the execution context's executor's // rules. We can call the function directly. boost_asio_handler_invoke_helpers::invoke(function, handler); } }; template class handler_work_base { public: explicit handler_work_base(const Executor& ex) BOOST_ASIO_NOEXCEPT #if !defined(BOOST_ASIO_NO_TYPEID) : executor_( ex.target_type() == typeid(typename IoContext::executor_type) ? Executor() : ex) #else // !defined(BOOST_ASIO_NO_TYPEID) : executor_(ex) #endif // !defined(BOOST_ASIO_NO_TYPEID) { if (executor_) executor_.on_work_started(); } handler_work_base(const Executor& ex, const Executor& candidate) BOOST_ASIO_NOEXCEPT : executor_(ex != candidate ? ex : Executor()) { if (executor_) executor_.on_work_started(); } template handler_work_base(const Executor& ex, const OtherExecutor&) BOOST_ASIO_NOEXCEPT : executor_(ex) { executor_.on_work_started(); } handler_work_base(const handler_work_base& other) BOOST_ASIO_NOEXCEPT : executor_(other.executor_) { if (executor_) executor_.on_work_started(); } #if defined(BOOST_ASIO_HAS_MOVE) handler_work_base(handler_work_base&& other) BOOST_ASIO_NOEXCEPT : executor_(BOOST_ASIO_MOVE_CAST(Executor)(other.executor_)) { } #endif // defined(BOOST_ASIO_HAS_MOVE) ~handler_work_base() { if (executor_) executor_.on_work_finished(); } bool owns_work() const BOOST_ASIO_NOEXCEPT { return !!executor_; } template void dispatch(Function& function, Handler& handler) { executor_.dispatch(BOOST_ASIO_MOVE_CAST(Function)(function), boost::asio::get_associated_allocator(handler)); } private: Executor executor_; }; template < #if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) typename... SupportableProperties, #else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, #endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) typename IoContext, typename PolymorphicExecutor> class handler_work_base< #if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) execution::any_executor, #else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) execution::any_executor, #endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) void, IoContext, PolymorphicExecutor> { public: typedef #if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) execution::any_executor #else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) execution::any_executor #endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) executor_type; explicit handler_work_base(const executor_type& ex) BOOST_ASIO_NOEXCEPT #if !defined(BOOST_ASIO_NO_TYPEID) : executor_( ex.target_type() == typeid(typename IoContext::executor_type) ? executor_type() : boost::asio::prefer(ex, execution::outstanding_work.tracked)) #else // !defined(BOOST_ASIO_NO_TYPEID) : executor_(boost::asio::prefer(ex, execution::outstanding_work.tracked)) #endif // !defined(BOOST_ASIO_NO_TYPEID) { } handler_work_base(const executor_type& ex, const executor_type& candidate) BOOST_ASIO_NOEXCEPT : executor_(ex != candidate ? ex : executor_type()) { } template handler_work_base(const executor_type& ex, const OtherExecutor&) BOOST_ASIO_NOEXCEPT : executor_(boost::asio::prefer(ex, execution::outstanding_work.tracked)) { } handler_work_base(const handler_work_base& other) BOOST_ASIO_NOEXCEPT : executor_(other.executor_) { } #if defined(BOOST_ASIO_HAS_MOVE) handler_work_base(handler_work_base&& other) BOOST_ASIO_NOEXCEPT : executor_(BOOST_ASIO_MOVE_CAST(executor_type)(other.executor_)) { } #endif // defined(BOOST_ASIO_HAS_MOVE) bool owns_work() const BOOST_ASIO_NOEXCEPT { return !!executor_; } template void dispatch(Function& function, Handler& handler) { execution::execute( boost::asio::prefer(executor_, execution::blocking.possibly, execution::allocator((get_associated_allocator)(handler))), BOOST_ASIO_MOVE_CAST(Function)(function)); } private: executor_type executor_; }; template class handler_work : handler_work_base, handler_work_base::type, IoExecutor> { public: typedef handler_work_base base1_type; typedef handler_work_base::type, IoExecutor> base2_type; handler_work(Handler& handler, const IoExecutor& io_ex) BOOST_ASIO_NOEXCEPT : base1_type(io_ex), base2_type(boost::asio::get_associated_executor(handler, io_ex), io_ex) { } template void complete(Function& function, Handler& handler) { if (!base1_type::owns_work() && !base2_type::owns_work()) { // When using a native implementation, I/O completion handlers are // already dispatched according to the execution context's executor's // rules. We can call the function directly. boost_asio_handler_invoke_helpers::invoke(function, handler); } else { base2_type::dispatch(function, handler); } } }; template class handler_work< Handler, IoExecutor, typename enable_if< is_same< typename associated_executor::asio_associated_executor_is_unspecialised, void >::value >::type> : handler_work_base { public: typedef handler_work_base base1_type; handler_work(Handler&, const IoExecutor& io_ex) BOOST_ASIO_NOEXCEPT : base1_type(io_ex) { } template void complete(Function& function, Handler& handler) { if (!base1_type::owns_work()) { // When using a native implementation, I/O completion handlers are // already dispatched according to the execution context's executor's // rules. We can call the function directly. boost_asio_handler_invoke_helpers::invoke(function, handler); } else { base1_type::dispatch(function, handler); } } }; } // namespace detail } // namespace asio } // namespace boost #include #endif // BOOST_ASIO_DETAIL_HANDLER_WORK_HPP