MCPcopy Create free account
hub / github.com/alibaba/async_simple / basic_system_executor

Class basic_system_executor

demo_example/asio/asio/system_executor.hpp:38–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 */
37template <typename Blocking, typename Relationship, typename Allocator>
38class basic_system_executor
39{
40public:
41 /// Default constructor.
42 basic_system_executor() ASIO_NOEXCEPT
43 : allocator_(Allocator())
44 {
45 }
46
47#if !defined(GENERATING_DOCUMENTATION)
48private:
49 friend struct asio_require_fn::impl;
50 friend struct asio_prefer_fn::impl;
51#endif // !defined(GENERATING_DOCUMENTATION)
52
53 /// Obtain an executor with the @c blocking.possibly property.
54 /**
55 * Do not call this function directly. It is intended for use with the
56 * asio::require customisation point.
57 *
58 * For example:
59 * @code asio::system_executor ex1;
60 * auto ex2 = asio::require(ex1,
61 * asio::execution::blocking.possibly); @endcode
62 */
63 basic_system_executor<execution::blocking_t::possibly_t,
64 Relationship, Allocator>
65 require(execution::blocking_t::possibly_t) const
66 {
67 return basic_system_executor<execution::blocking_t::possibly_t,
68 Relationship, Allocator>(allocator_);
69 }
70
71 /// Obtain an executor with the @c blocking.always property.
72 /**
73 * Do not call this function directly. It is intended for use with the
74 * asio::require customisation point.
75 *
76 * For example:
77 * @code asio::system_executor ex1;
78 * auto ex2 = asio::require(ex1,
79 * asio::execution::blocking.always); @endcode
80 */
81 basic_system_executor<execution::blocking_t::always_t,
82 Relationship, Allocator>
83 require(execution::blocking_t::always_t) const
84 {
85 return basic_system_executor<execution::blocking_t::always_t,
86 Relationship, Allocator>(allocator_);
87 }
88
89 /// Obtain an executor with the @c blocking.never property.
90 /**
91 * Do not call this function directly. It is intended for use with the
92 * asio::require customisation point.
93 *
94 * For example:
95 * @code asio::system_executor ex1;

Callers

nothing calls this directly

Calls 1

queryFunction · 0.85

Tested by

no test coverage detected