/
usr
/
include
/
boost
/
asio
/
/usr/include/boost/asio
mkdir
upload
Name
Size
Mode
Actions
detail/
-
0755
rm
execution/
-
0755
rm
generic/
-
0755
rm
impl/
-
0755
rm
ip/
-
0755
rm
local/
-
0755
rm
posix/
-
0755
rm
ssl/
-
0755
rm
traits/
-
0755
rm
ts/
-
0755
rm
windows/
-
0755
rm
any_io_executor.hpp
2625
0644
edit
dl
rm
associated_allocator.hpp
3791
0644
edit
dl
rm
associated_executor.hpp
5057
0644
edit
dl
rm
async_result.hpp
19423
0644
edit
dl
rm
awaitable.hpp
3270
0644
edit
dl
rm
basic_datagram_socket.hpp
47521
0644
edit
dl
rm
basic_deadline_timer.hpp
24158
0644
edit
dl
rm
basic_io_object.hpp
8096
0644
edit
dl
rm
basic_raw_socket.hpp
46996
0644
edit
dl
rm
basic_seq_packet_socket.hpp
29184
0644
edit
dl
rm
basic_serial_port.hpp
31912
0644
edit
dl
rm
basic_signal_set.hpp
19876
0644
edit
dl
rm
basic_socket.hpp
65516
0644
edit
dl
rm
basic_socket_acceptor.hpp
88062
0644
edit
dl
rm
basic_socket_iostream.hpp
13298
0644
edit
dl
rm
basic_socket_streambuf.hpp
21713
0644
edit
dl
rm
basic_streambuf.hpp
13714
0644
edit
dl
rm
basic_streambuf_fwd.hpp
920
0644
edit
dl
rm
basic_stream_socket.hpp
41520
0644
edit
dl
rm
basic_waitable_timer.hpp
28528
0644
edit
dl
rm
bind_executor.hpp
16510
0644
edit
dl
rm
buffer.hpp
83254
0644
edit
dl
rm
buffered_read_stream.hpp
8424
0644
edit
dl
rm
buffered_read_stream_fwd.hpp
699
0644
edit
dl
rm
buffered_stream.hpp
9074
0644
edit
dl
rm
buffered_stream_fwd.hpp
669
0644
edit
dl
rm
buffered_write_stream.hpp
8042
0644
edit
dl
rm
buffered_write_stream_fwd.hpp
705
0644
edit
dl
rm
buffers_iterator.hpp
14049
0644
edit
dl
rm
completion_condition.hpp
5500
0644
edit
dl
rm
compose.hpp
4596
0644
edit
dl
rm
connect.hpp
43157
0644
edit
dl
rm
coroutine.hpp
9897
0644
edit
dl
rm
co_spawn.hpp
14509
0644
edit
dl
rm
deadline_timer.hpp
1138
0644
edit
dl
rm
defer.hpp
5070
0644
edit
dl
rm
detached.hpp
3517
0644
edit
dl
rm
dispatch.hpp
4537
0644
edit
dl
rm
error.hpp
10351
0644
edit
dl
rm
execution.hpp
1871
0644
edit
dl
rm
execution_context.hpp
14341
0644
edit
dl
rm
executor.hpp
10467
0644
edit
dl
rm
executor_work_guard.hpp
8039
0644
edit
dl
rm
handler_alloc_hook.hpp
3471
0644
edit
dl
rm
handler_continuation_hook.hpp
1474
0644
edit
dl
rm
handler_invoke_hook.hpp
3744
0644
edit
dl
rm
high_resolution_timer.hpp
1394
0644
edit
dl
rm
io_context.hpp
55226
0644
edit
dl
rm
io_context_strand.hpp
13706
0644
edit
dl
rm
io_service.hpp
861
0644
edit
dl
rm
io_service_strand.hpp
575
0644
edit
dl
rm
is_applicable_property.hpp
1605
0644
edit
dl
rm
is_executor.hpp
1306
0644
edit
dl
rm
is_read_buffered.hpp
1646
0644
edit
dl
rm
is_write_buffered.hpp
1667
0644
edit
dl
rm
multiple_exceptions.hpp
1631
0644
edit
dl
rm
packaged_task.hpp
3358
0644
edit
dl
rm
placeholders.hpp
4146
0644
edit
dl
rm
post.hpp
4760
0644
edit
dl
rm
prefer.hpp
18821
0644
edit
dl
rm
query.hpp
8323
0644
edit
dl
rm
read.hpp
53894
0644
edit
dl
rm
read_at.hpp
27766
0644
edit
dl
rm
read_until.hpp
119477
0644
edit
dl
rm
redirect_error.hpp
1938
0644
edit
dl
rm
require.hpp
14926
0644
edit
dl
rm
require_concept.hpp
9218
0644
edit
dl
rm
serial_port.hpp
1010
0644
edit
dl
rm
serial_port_base.hpp
4975
0644
edit
dl
rm
signal_set.hpp
748
0644
edit
dl
rm
socket_base.hpp
15939
0644
edit
dl
rm
spawn.hpp
11793
0644
edit
dl
rm
ssl.hpp
848
0644
edit
dl
rm
static_thread_pool.hpp
826
0644
edit
dl
rm
steady_timer.hpp
1306
0644
edit
dl
rm
strand.hpp
17193
0644
edit
dl
rm
streambuf.hpp
826
0644
edit
dl
rm
system_context.hpp
2649
0644
edit
dl
rm
system_executor.hpp
22529
0644
edit
dl
rm
system_timer.hpp
1306
0644
edit
dl
rm
this_coro.hpp
1149
0644
edit
dl
rm
thread_pool.hpp
37567
0644
edit
dl
rm
time_traits.hpp
2281
0644
edit
dl
rm
unyield.hpp
381
0644
edit
dl
rm
uses_executor.hpp
2348
0644
edit
dl
rm
use_awaitable.hpp
5821
0644
edit
dl
rm
use_future.hpp
4820
0644
edit
dl
rm
version.hpp
686
0644
edit
dl
rm
wait_traits.hpp
1451
0644
edit
dl
rm
write.hpp
52959
0644
edit
dl
rm
write_at.hpp
29514
0644
edit
dl
rm
yield.hpp
482
0644
edit
dl
rm
Edit:
/usr/include/boost/asio/executor.hpp
(10467B)
// // executor.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_EXECUTOR_HPP #define BOOST_ASIO_EXECUTOR_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include <boost/asio/detail/config.hpp> #if !defined(BOOST_ASIO_NO_TS_EXECUTORS) #include <typeinfo> #include <boost/asio/detail/cstddef.hpp> #include <boost/asio/detail/executor_function.hpp> #include <boost/asio/detail/memory.hpp> #include <boost/asio/detail/throw_exception.hpp> #include <boost/asio/execution_context.hpp> #include <boost/asio/detail/push_options.hpp> namespace boost { namespace asio { /// Exception thrown when trying to access an empty polymorphic executor. class bad_executor : public std::exception { public: /// Constructor. BOOST_ASIO_DECL bad_executor() BOOST_ASIO_NOEXCEPT; /// Obtain message associated with exception. BOOST_ASIO_DECL virtual const char* what() const BOOST_ASIO_NOEXCEPT_OR_NOTHROW; }; /// Polymorphic wrapper for executors. class executor { public: /// Default constructor. executor() BOOST_ASIO_NOEXCEPT : impl_(0) { } /// Construct from nullptr. executor(nullptr_t) BOOST_ASIO_NOEXCEPT : impl_(0) { } /// Copy constructor. executor(const executor& other) BOOST_ASIO_NOEXCEPT : impl_(other.clone()) { } #if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Move constructor. executor(executor&& other) BOOST_ASIO_NOEXCEPT : impl_(other.impl_) { other.impl_ = 0; } #endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Construct a polymorphic wrapper for the specified executor. template <typename Executor> executor(Executor e); /// Allocator-aware constructor to create a polymorphic wrapper for the /// specified executor. template <typename Executor, typename Allocator> executor(allocator_arg_t, const Allocator& a, Executor e); /// Destructor. ~executor() { destroy(); } /// Assignment operator. executor& operator=(const executor& other) BOOST_ASIO_NOEXCEPT { destroy(); impl_ = other.clone(); return *this; } #if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) // Move assignment operator. executor& operator=(executor&& other) BOOST_ASIO_NOEXCEPT { destroy(); impl_ = other.impl_; other.impl_ = 0; return *this; } #endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) /// Assignment operator for nullptr_t. executor& operator=(nullptr_t) BOOST_ASIO_NOEXCEPT { destroy(); impl_ = 0; return *this; } /// Assignment operator to create a polymorphic wrapper for the specified /// executor. template <typename Executor> executor& operator=(BOOST_ASIO_MOVE_ARG(Executor) e) BOOST_ASIO_NOEXCEPT { executor tmp(BOOST_ASIO_MOVE_CAST(Executor)(e)); destroy(); impl_ = tmp.impl_; tmp.impl_ = 0; return *this; } /// Obtain the underlying execution context. execution_context& context() const BOOST_ASIO_NOEXCEPT { return get_impl()->context(); } /// Inform the executor that it has some outstanding work to do. void on_work_started() const BOOST_ASIO_NOEXCEPT { get_impl()->on_work_started(); } /// Inform the executor that some work is no longer outstanding. void on_work_finished() const BOOST_ASIO_NOEXCEPT { get_impl()->on_work_finished(); } /// Request the executor to invoke the given function object. /** * This function is used to ask the executor to execute the given function * object. The function object is executed according to the rules of the * target executor object. * * @param f The function object to be called. The executor will make a copy * of the handler object as required. The function signature of the function * object must be: @code void function(); @endcode * * @param a An allocator that may be used by the executor to allocate the * internal storage needed for function invocation. */ template <typename Function, typename Allocator> void dispatch(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const; /// Request the executor to invoke the given function object. /** * This function is used to ask the executor to execute the given function * object. The function object is executed according to the rules of the * target executor object. * * @param f The function object to be called. The executor will make * a copy of the handler object as required. The function signature of the * function object must be: @code void function(); @endcode * * @param a An allocator that may be used by the executor to allocate the * internal storage needed for function invocation. */ template <typename Function, typename Allocator> void post(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const; /// Request the executor to invoke the given function object. /** * This function is used to ask the executor to execute the given function * object. The function object is executed according to the rules of the * target executor object. * * @param f The function object to be called. The executor will make * a copy of the handler object as required. The function signature of the * function object must be: @code void function(); @endcode * * @param a An allocator that may be used by the executor to allocate the * internal storage needed for function invocation. */ template <typename Function, typename Allocator> void defer(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const; struct unspecified_bool_type_t {}; typedef void (*unspecified_bool_type)(unspecified_bool_type_t); static void unspecified_bool_true(unspecified_bool_type_t) {} /// Operator to test if the executor contains a valid target. operator unspecified_bool_type() const BOOST_ASIO_NOEXCEPT { return impl_ ? &executor::unspecified_bool_true : 0; } /// Obtain type information for the target executor object. /** * @returns If @c *this has a target type of type @c T, <tt>typeid(T)</tt>; * otherwise, <tt>typeid(void)</tt>. */ #if !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION) const std::type_info& target_type() const BOOST_ASIO_NOEXCEPT { return impl_ ? impl_->target_type() : typeid(void); } #else // !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION) const void* target_type() const BOOST_ASIO_NOEXCEPT { return impl_ ? impl_->target_type() : 0; } #endif // !defined(BOOST_ASIO_NO_TYPEID) || defined(GENERATING_DOCUMENTATION) /// Obtain a pointer to the target executor object. /** * @returns If <tt>target_type() == typeid(T)</tt>, a pointer to the stored * executor target; otherwise, a null pointer. */ template <typename Executor> Executor* target() BOOST_ASIO_NOEXCEPT; /// Obtain a pointer to the target executor object. /** * @returns If <tt>target_type() == typeid(T)</tt>, a pointer to the stored * executor target; otherwise, a null pointer. */ template <typename Executor> const Executor* target() const BOOST_ASIO_NOEXCEPT; /// Compare two executors for equality. friend bool operator==(const executor& a, const executor& b) BOOST_ASIO_NOEXCEPT { if (a.impl_ == b.impl_) return true; if (!a.impl_ || !b.impl_) return false; return a.impl_->equals(b.impl_); } /// Compare two executors for inequality. friend bool operator!=(const executor& a, const executor& b) BOOST_ASIO_NOEXCEPT { return !(a == b); } private: #if !defined(GENERATING_DOCUMENTATION) typedef detail::executor_function function; template <typename, typename> class impl; #if !defined(BOOST_ASIO_NO_TYPEID) typedef const std::type_info& type_id_result_type; #else // !defined(BOOST_ASIO_NO_TYPEID) typedef const void* type_id_result_type; #endif // !defined(BOOST_ASIO_NO_TYPEID) template <typename T> static type_id_result_type type_id() { #if !defined(BOOST_ASIO_NO_TYPEID) return typeid(T); #else // !defined(BOOST_ASIO_NO_TYPEID) static int unique_id; return &unique_id; #endif // !defined(BOOST_ASIO_NO_TYPEID) } // Base class for all polymorphic executor implementations. class impl_base { public: virtual impl_base* clone() const BOOST_ASIO_NOEXCEPT = 0; virtual void destroy() BOOST_ASIO_NOEXCEPT = 0; virtual execution_context& context() BOOST_ASIO_NOEXCEPT = 0; virtual void on_work_started() BOOST_ASIO_NOEXCEPT = 0; virtual void on_work_finished() BOOST_ASIO_NOEXCEPT = 0; virtual void dispatch(BOOST_ASIO_MOVE_ARG(function)) = 0; virtual void post(BOOST_ASIO_MOVE_ARG(function)) = 0; virtual void defer(BOOST_ASIO_MOVE_ARG(function)) = 0; virtual type_id_result_type target_type() const BOOST_ASIO_NOEXCEPT = 0; virtual void* target() BOOST_ASIO_NOEXCEPT = 0; virtual const void* target() const BOOST_ASIO_NOEXCEPT = 0; virtual bool equals(const impl_base* e) const BOOST_ASIO_NOEXCEPT = 0; protected: impl_base(bool fast_dispatch) : fast_dispatch_(fast_dispatch) {} virtual ~impl_base() {} private: friend class executor; const bool fast_dispatch_; }; // Helper function to check and return the implementation pointer. impl_base* get_impl() const { if (!impl_) { bad_executor ex; boost::asio::detail::throw_exception(ex); } return impl_; } // Helper function to clone another implementation. impl_base* clone() const BOOST_ASIO_NOEXCEPT { return impl_ ? impl_->clone() : 0; } // Helper function to destroy an implementation. void destroy() BOOST_ASIO_NOEXCEPT { if (impl_) impl_->destroy(); } impl_base* impl_; #endif // !defined(GENERATING_DOCUMENTATION) }; } // namespace asio } // namespace boost BOOST_ASIO_USES_ALLOCATOR(boost::asio::executor) #include <boost/asio/detail/pop_options.hpp> #include <boost/asio/impl/executor.hpp> #if defined(BOOST_ASIO_HEADER_ONLY) # include <boost/asio/impl/executor.ipp> #endif // defined(BOOST_ASIO_HEADER_ONLY) #endif // !defined(BOOST_ASIO_NO_TS_EXECUTORS) #endif // BOOST_ASIO_EXECUTOR_HPP
Save
cmd:
run