include/boost/capy/task.hpp
87.4% Lines (2430/2779)
93.3% Functions (897/961)
52.7% Branches (531/1008)
include/boost/capy/task.hpp
| Line | Branch | Hits | Source Code |
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2025 Vinnie Falco (vinnie.falco@gmail.com) | ||
| 3 | // | ||
| 4 | // Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
| 5 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
| 6 | // | ||
| 7 | // Official repository: https://github.com/cppalliance/corosio | ||
| 8 | // | ||
| 9 | |||
| 10 | #ifndef BOOST_CAPY_TASK_HPP | ||
| 11 | #define BOOST_CAPY_TASK_HPP | ||
| 12 | |||
| 13 | #include <boost/capy/detail/config.hpp> | ||
| 14 | #include <boost/capy/concept/executor.hpp> | ||
| 15 | #include <boost/capy/concept/io_awaitable.hpp> | ||
| 16 | #include <boost/capy/ex/io_awaitable_support.hpp> | ||
| 17 | #include <boost/capy/ex/io_env.hpp> | ||
| 18 | #include <boost/capy/ex/frame_allocator.hpp> | ||
| 19 | |||
| 20 | #include <exception> | ||
| 21 | #include <optional> | ||
| 22 | #include <type_traits> | ||
| 23 | #include <utility> | ||
| 24 | #include <variant> | ||
| 25 | |||
| 26 | namespace boost { | ||
| 27 | namespace capy { | ||
| 28 | |||
| 29 | namespace detail { | ||
| 30 | |||
| 31 | // Helper base for result storage and return_void/return_value | ||
| 32 | template<typename T> | ||
| 33 | struct task_return_base | ||
| 34 | { | ||
| 35 | std::optional<T> result_; | ||
| 36 | |||
| 37 | 1230 | void return_value(T value) | |
| 38 | { | ||
| 39 | 1230 | result_ = std::move(value); | |
| 40 | 1230 | } | |
| 41 | |||
| 42 | 128 | T&& result() noexcept | |
| 43 | { | ||
| 44 | 128 | return std::move(*result_); | |
| 45 | } | ||
| 46 | }; | ||
| 47 | |||
| 48 | template<> | ||
| 49 | struct task_return_base<void> | ||
| 50 | { | ||
| 51 | 1245 | void return_void() | |
| 52 | { | ||
| 53 | 1245 | } | |
| 54 | }; | ||
| 55 | |||
| 56 | } // namespace detail | ||
| 57 | |||
| 58 | /** Lazy coroutine task satisfying @ref IoRunnable. | ||
| 59 | |||
| 60 | Use `task<T>` as the return type for coroutines that perform I/O | ||
| 61 | and return a value of type `T`. The coroutine body does not start | ||
| 62 | executing until the task is awaited, enabling efficient composition | ||
| 63 | without unnecessary eager execution. | ||
| 64 | |||
| 65 | The task participates in the I/O awaitable protocol: when awaited, | ||
| 66 | it receives the caller's executor and stop token, propagating them | ||
| 67 | to nested `co_await` expressions. This enables cancellation and | ||
| 68 | proper completion dispatch across executor boundaries. | ||
| 69 | |||
| 70 | @tparam T The result type. Use `task<>` for `task<void>`. | ||
| 71 | |||
| 72 | @par Thread Safety | ||
| 73 | Distinct objects: Safe. | ||
| 74 | Shared objects: Unsafe. | ||
| 75 | |||
| 76 | @par Example | ||
| 77 | |||
| 78 | @code | ||
| 79 | task<int> compute_value() | ||
| 80 | { | ||
| 81 | auto [ec, n] = co_await stream.read_some( buf ); | ||
| 82 | if( ec ) | ||
| 83 | co_return 0; | ||
| 84 | co_return process( buf, n ); | ||
| 85 | } | ||
| 86 | |||
| 87 | task<> run_session( tcp_socket sock ) | ||
| 88 | { | ||
| 89 | int result = co_await compute_value(); | ||
| 90 | // ... | ||
| 91 | } | ||
| 92 | @endcode | ||
| 93 | |||
| 94 | @see IoRunnable, IoAwaitable, run, run_async | ||
| 95 | */ | ||
| 96 | template<typename T = void> | ||
| 97 | struct [[nodiscard]] BOOST_CAPY_CORO_AWAIT_ELIDABLE | ||
| 98 | task | ||
| 99 | { | ||
| 100 | struct promise_type | ||
| 101 | : io_awaitable_support<promise_type> | ||
| 102 | , detail::task_return_base<T> | ||
| 103 | { | ||
| 104 | private: | ||
| 105 | friend task; | ||
| 106 | union { std::exception_ptr ep_; }; | ||
| 107 | bool has_ep_; | ||
| 108 | |||
| 109 | public: | ||
| 110 | 3721 | promise_type() noexcept | |
| 111 | 3721 | : has_ep_(false) | |
| 112 | { | ||
| 113 | 3721 | } | |
| 114 | |||
| 115 | 3721 | ~promise_type() | |
| 116 | { | ||
| 117 |
41/60boost::capy::task<bool>::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 14 times.
boost::capy::task<boost::capy::io_result<> >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::~promise_type():
✓ Branch 0 taken 479 times.
✓ Branch 1 taken 842 times.
boost::capy::task<double>::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
boost::capy::task<int>::promise_type::~promise_type():
✓ Branch 0 taken 46 times.
✓ Branch 1 taken 272 times.
boost::capy::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 12 times.
boost::capy::task<std::pair<unsigned long, boost::capy::io_result<> > >::promise_type::~promise_type():
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 6 times.
boost::capy::task<std::pair<unsigned long, int> >::promise_type::~promise_type():
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 11 times.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<> > > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<>, int> > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<unsigned long> > > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<unsigned long>, int> > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
boost::capy::task<std::pair<unsigned long, std::variant<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double> > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<int> > >::promise_type::~promise_type():
✓ Branch 0 taken 4 times.
✓ Branch 1 taken 26 times.
boost::capy::task<std::pair<unsigned long, std::variant<std::monostate, int> > >::promise_type::~promise_type():
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 2 times.
boost::capy::task<std::pair<unsigned long, std::variant<std::monostate> > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
boost::capy::task<std::stop_token>::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<boost::capy::io_result<> > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<boost::capy::io_result<>, boost::capy::io_result<> > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<boost::capy::io_result<>, int> >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<int, boost::capy::io_result<unsigned long> > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<int, int, int, int, int, int, int, int> >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<int, int, int> >::promise_type::~promise_type():
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
boost::capy::task<std::tuple<int, int> >::promise_type::~promise_type():
✓ Branch 0 taken 5 times.
✓ Branch 1 taken 12 times.
boost::capy::task<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<int> >::promise_type::~promise_type():
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 3 times.
boost::capy::task<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::promise_type::~promise_type():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<unsigned long>::promise_type::~promise_type():
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 6 times.
boost::capy::task<void>::promise_type::~promise_type():
✓ Branch 0 taken 695 times.
✓ Branch 1 taken 1251 times.
|
3721 | if(has_ep_) |
| 118 | 1238 | ep_.~exception_ptr(); | |
| 119 | 3721 | } | |
| 120 | |||
| 121 | 2758 | std::exception_ptr exception() const noexcept | |
| 122 | { | ||
| 123 |
37/54boost::capy::task<bool>::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 13 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<double>::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<int>::promise_type::exception() const:
✓ Branch 0 taken 32 times.
✓ Branch 1 taken 56 times.
boost::capy::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
boost::capy::task<std::pair<unsigned long, boost::capy::io_result<> > >::promise_type::exception() const:
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 6 times.
boost::capy::task<std::pair<unsigned long, int> >::promise_type::exception() const:
✓ Branch 0 taken 6 times.
✓ Branch 1 taken 6 times.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<> > > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<>, int> > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<unsigned long> > > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<unsigned long>, int> > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 3 times.
boost::capy::task<std::pair<unsigned long, std::variant<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double> > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<int> > >::promise_type::exception() const:
✓ Branch 0 taken 8 times.
✓ Branch 1 taken 20 times.
boost::capy::task<std::pair<unsigned long, std::variant<std::monostate, int> > >::promise_type::exception() const:
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
boost::capy::task<std::pair<unsigned long, std::variant<std::monostate> > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 2 times.
boost::capy::task<std::tuple<boost::capy::io_result<>, boost::capy::io_result<> > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<boost::capy::io_result<>, int> >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<int, boost::capy::io_result<unsigned long> > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<int, int, int, int, int, int, int, int> >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<int, int, int> >::promise_type::exception() const:
✓ Branch 0 taken 4 times.
✓ Branch 1 taken 2 times.
boost::capy::task<std::tuple<int, int> >::promise_type::exception() const:
✓ Branch 0 taken 8 times.
✓ Branch 1 taken 7 times.
boost::capy::task<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<std::tuple<int> >::promise_type::exception() const:
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 3 times.
boost::capy::task<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::promise_type::exception() const:
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
boost::capy::task<unsigned long>::promise_type::exception() const:
✓ Branch 0 taken 2 times.
✓ Branch 1 taken 6 times.
boost::capy::task<void>::promise_type::exception() const:
✓ Branch 0 taken 1382 times.
✓ Branch 1 taken 1167 times.
|
2758 | if(has_ep_) |
| 124 | 1448 | return ep_; | |
| 125 | 1310 | return {}; | |
| 126 | } | ||
| 127 | |||
| 128 | 3721 | task get_return_object() | |
| 129 | { | ||
| 130 | 3721 | return task{std::coroutine_handle<promise_type>::from_promise(*this)}; | |
| 131 | } | ||
| 132 | |||
| 133 | 3721 | auto initial_suspend() noexcept | |
| 134 | { | ||
| 135 | struct awaiter | ||
| 136 | { | ||
| 137 | promise_type* p_; | ||
| 138 | |||
| 139 | 144 | bool await_ready() const noexcept | |
| 140 | { | ||
| 141 | 144 | return false; | |
| 142 | } | ||
| 143 | |||
| 144 | 144 | void await_suspend(std::coroutine_handle<>) const noexcept | |
| 145 | { | ||
| 146 | 144 | } | |
| 147 | |||
| 148 | 144 | void await_resume() const noexcept | |
| 149 | { | ||
| 150 | // Restore TLS when body starts executing | ||
| 151 | 144 | auto* fa = p_->environment()->allocator; | |
| 152 |
3/6✓ Branch 0 taken 144 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 144 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 144 times.
|
144 | if(fa && fa != current_frame_allocator()) |
| 153 | ✗ | current_frame_allocator() = fa; | |
| 154 | 144 | } | |
| 155 | }; | ||
| 156 | 3721 | return awaiter{this}; | |
| 157 | } | ||
| 158 | |||
| 159 | 3713 | auto final_suspend() noexcept | |
| 160 | { | ||
| 161 | struct awaiter | ||
| 162 | { | ||
| 163 | promise_type* p_; | ||
| 164 | |||
| 165 | 144 | bool await_ready() const noexcept | |
| 166 | { | ||
| 167 | 144 | return false; | |
| 168 | } | ||
| 169 | |||
| 170 | 144 | std::coroutine_handle<> await_suspend(std::coroutine_handle<>) const noexcept | |
| 171 | { | ||
| 172 | 144 | return p_->continuation(); | |
| 173 | } | ||
| 174 | |||
| 175 | ✗ | void await_resume() const noexcept | |
| 176 | { | ||
| 177 | ✗ | } | |
| 178 | }; | ||
| 179 | 3713 | return awaiter{this}; | |
| 180 | } | ||
| 181 | |||
| 182 | 1238 | void unhandled_exception() | |
| 183 | { | ||
| 184 | 1238 | new (&ep_) std::exception_ptr(std::current_exception()); | |
| 185 | 1238 | has_ep_ = true; | |
| 186 | 1238 | } | |
| 187 | |||
| 188 | template<class Awaitable> | ||
| 189 | struct transform_awaiter | ||
| 190 | { | ||
| 191 | std::decay_t<Awaitable> a_; | ||
| 192 | promise_type* p_; | ||
| 193 | |||
| 194 | 7270 | bool await_ready() noexcept | |
| 195 | { | ||
| 196 | 7270 | return a_.await_ready(); | |
| 197 | } | ||
| 198 | |||
| 199 | 7265 | decltype(auto) await_resume() | |
| 200 | { | ||
| 201 | // Restore TLS before body resumes | ||
| 202 | 7265 | auto* fa = p_->environment()->allocator; | |
| 203 |
392/804boost::capy::task<bool>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable_ex<boost::capy::task<bool>, boost::capy::test_executor, true, void> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<bool>::promise_type::transform_awaiter<boost::capy::immediate<boost::capy::io_result<> > >::await_resume():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<bool>::promise_type::transform_awaiter<boost::capy::task<std::stop_token> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_buffer_sink::commit(unsigned long)::awaitable>::await_resume():
✓ Branch 0 taken 62 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 62 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 62 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_buffer_sink::commit_eof(unsigned long)::awaitable>::await_resume():
✓ Branch 0 taken 22 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 22 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 22 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_buffer_sink::write_(std::span<boost::capy::const_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 14 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 14 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 14 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_buffer_sink::write_eof()::awaitable>::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_buffer_sink::write_eof_buffers_(std::span<boost::capy::const_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 12 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 12 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 12 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_buffer_sink::write_some_(std::span<boost::capy::const_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_buffer_source::pull(std::span<boost::capy::const_buffer, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 30 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 30 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 30 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_buffer_source::read_(std::span<boost::capy::mutable_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 18 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 18 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 18 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_buffer_source::read_some_(std::span<boost::capy::mutable_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 48 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 48 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_read_source::read_(std::span<boost::capy::mutable_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 116 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 116 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 116 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_write_sink::write_(std::span<boost::capy::const_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 78 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 78 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 78 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_write_sink::write_eof()::awaitable>::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::any_write_sink::write_eof_buffers_(std::span<boost::capy::const_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 16 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 16 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 16 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::immediate<boost::capy::io_result<unsigned long> > >::await_resume():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::buffer_sink::commit(unsigned long)::awaitable>::await_resume():
✓ Branch 0 taken 386 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 386 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 386 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::buffer_sink::commit_eof(unsigned long)::awaitable>::await_resume():
✓ Branch 0 taken 92 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 92 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 92 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::buffer_source::pull(std::span<boost::capy::const_buffer, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 448 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 448 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 448 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::read_source::read<boost::capy::mutable_buffer>(boost::capy::mutable_buffer)::awaitable>::await_resume():
✓ Branch 0 taken 48 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 48 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 48 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::read_source::read<std::array<boost::capy::mutable_buffer, 2ul> >(std::array<boost::capy::mutable_buffer, 2ul>)::awaitable>::await_resume():
✓ Branch 0 taken 24 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 24 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 24 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::read_source::read<std::span<boost::capy::mutable_buffer const, 18446744073709551615ul> >(std::span<boost::capy::mutable_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 172 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 172 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 172 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::read_stream::read_some<boost::capy::consuming_buffers<boost::capy::mutable_buffer> >(boost::capy::consuming_buffers<boost::capy::mutable_buffer>)::awaitable>::await_resume():
✓ Branch 0 taken 24 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 24 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 24 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::read_stream::read_some<boost::capy::consuming_buffers<std::array<boost::capy::mutable_buffer, 2ul> > >(boost::capy::consuming_buffers<std::array<boost::capy::mutable_buffer, 2ul> >)::awaitable>::await_resume():
✓ Branch 0 taken 36 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 36 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 36 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::read_stream::read_some<boost::capy::mutable_buffer>(boost::capy::mutable_buffer)::awaitable>::await_resume():
✓ Branch 0 taken 316 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 316 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 316 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::read_stream::read_some<std::array<boost::capy::mutable_buffer, 2ul> >(std::array<boost::capy::mutable_buffer, 2ul>)::awaitable>::await_resume():
✓ Branch 0 taken 42 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 42 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 42 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::read_stream::read_some<std::span<boost::capy::mutable_buffer const, 18446744073709551615ul> >(std::span<boost::capy::mutable_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 444 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 444 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 444 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::write_sink::write<std::span<boost::capy::const_buffer, 18446744073709551615ul> >(std::span<boost::capy::const_buffer, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 128 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 128 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 128 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::write_sink::write_eof()::awaitable>::await_resume():
✓ Branch 0 taken 44 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 44 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 44 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::write_stream::write_some<boost::capy::consuming_buffers<boost::capy::const_buffer> >(boost::capy::consuming_buffers<boost::capy::const_buffer>)::awaitable>::await_resume():
✓ Branch 0 taken 18 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 18 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 18 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::write_stream::write_some<boost::capy::consuming_buffers<std::array<boost::capy::const_buffer, 2ul> > >(boost::capy::consuming_buffers<std::array<boost::capy::const_buffer, 2ul> >)::awaitable>::await_resume():
✓ Branch 0 taken 24 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 24 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 24 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::promise_type::transform_awaiter<boost::capy::test::write_stream::write_some<std::span<boost::capy::const_buffer, 18446744073709551615ul> >(std::span<boost::capy::const_buffer, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 148 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 148 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 148 times.
boost::capy::task<double>::promise_type::transform_awaiter<boost::capy::immediate<boost::capy::io_result<int, double> > >::await_resume():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable<boost::capy::task<int>, false, boost::capy::test_allocator<std::byte> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable<boost::capy::task<int>, false, std::pmr::memory_resource*> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable<boost::capy::task<int>, false, void> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable<boost::capy::task<int>, true, boost::capy::test_allocator<std::byte> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable<boost::capy::task<int>, true, std::pmr::memory_resource*> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable_ex<boost::capy::task<int>, boost::capy::test_executor, false, boost::capy::test_allocator<std::byte> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable_ex<boost::capy::task<int>, boost::capy::test_executor, false, std::pmr::memory_resource*> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable_ex<boost::capy::task<int>, boost::capy::test_executor, false, void> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable_ex<boost::capy::task<int>, boost::capy::test_executor, true, boost::capy::test_allocator<std::byte> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable_ex<boost::capy::task<int>, boost::capy::test_executor, true, std::pmr::memory_resource*> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable_ex<boost::capy::test::custom_task<int>, boost::capy::test_executor, true, void> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::immediate<boost::capy::io_result<int, int, int> > >::await_resume():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::immediate<int> >::await_resume():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::task<int> >::await_resume():
✓ Branch 0 taken 24 times.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 24 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 33 times.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::task<std::pair<unsigned long, int> > >::await_resume():
✓ Branch 0 taken 5 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 5 times.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::task<std::pair<unsigned long, std::variant<int> > > >::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::task<std::tuple<int, int> > >::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::task<void> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<int>::promise_type::transform_awaiter<boost::capy::yield_awaitable>::await_resume():
✓ Branch 0 taken 24 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 24 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 24 times.
boost::capy::task<std::pair<unsigned long, boost::capy::io_result<> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_homogeneous_launcher<std::vector<boost::capy::async_event::wait_awaiter, std::allocator<boost::capy::async_event::wait_awaiter> > > >::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<std::pair<unsigned long, int> >::promise_type::transform_awaiter<boost::capy::detail::when_any_homogeneous_launcher<std::vector<boost::capy::task<int>, std::allocator<boost::capy::task<int> > > > >::await_resume():
✓ Branch 0 taken 13 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 13 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 13 times.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<> > > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<boost::capy::io_result<> >, boost::capy::task<boost::capy::io_result<> > > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<>, int> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::async_event::wait_awaiter, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<unsigned long> > > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<boost::capy::io_result<unsigned long> >, boost::capy::task<boost::capy::io_result<unsigned long> > > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<unsigned long>, int> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<boost::capy::io_result<unsigned long> >, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<int>, boost::capy::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<int>, boost::capy::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2 times.
boost::capy::task<std::pair<unsigned long, std::variant<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<int>, boost::capy::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::capy::task<double> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<int> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2 times.
boost::capy::task<std::pair<unsigned long, std::variant<int> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<int>, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 17 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 17 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 17 times.
boost::capy::task<std::pair<unsigned long, std::variant<int> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 9 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 9 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 9 times.
boost::capy::task<std::pair<unsigned long, std::variant<int> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<int> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<std::monostate, int> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::stop_only_awaitable, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<std::monostate, int> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<void>, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2 times.
boost::capy::task<std::pair<unsigned long, std::variant<std::monostate> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::stop_only_awaitable, boost::capy::stop_only_awaitable> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<std::monostate> > >::promise_type::transform_awaiter<boost::capy::detail::when_any_launcher<boost::capy::task<void>, boost::capy::task<void>, boost::capy::task<void> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::tuple<boost::capy::io_result<> > >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::async_event::wait_awaiter, boost::capy::task<void> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::tuple<boost::capy::io_result<>, boost::capy::io_result<> > >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::task<boost::capy::io_result<> >, boost::capy::task<boost::capy::io_result<> > > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::tuple<boost::capy::io_result<>, int> >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::async_event::wait_awaiter, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::tuple<int, boost::capy::io_result<unsigned long> > >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::task<int>, boost::capy::task<boost::capy::io_result<unsigned long> > > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::tuple<int, int, int, int, int, int, int, int> >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::tuple<int, int, int> >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::task<int>, boost::capy::task<int>, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 4 times.
boost::capy::task<std::tuple<int, int> >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::task<int>, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 16 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 16 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 16 times.
boost::capy::task<std::tuple<int, int> >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::task<int>, boost::capy::task<void>, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::task<int>, boost::capy::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::capy::task<void> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::tuple<int> >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::stop_only_awaitable, boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::tuple<int> >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::task<int> > >::await_resume():
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2 times.
boost::capy::task<std::tuple<int> >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::task<int>, boost::capy::task<void> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::capy::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::capy::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<unsigned long>::promise_type::transform_awaiter<boost::capy::detail::when_any_homogeneous_launcher<std::vector<boost::capy::stop_only_awaitable, std::allocator<boost::capy::stop_only_awaitable> > > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<unsigned long>::promise_type::transform_awaiter<boost::capy::detail::when_any_homogeneous_launcher<std::vector<boost::capy::task<void>, std::allocator<boost::capy::task<void> > > > >::await_resume():
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2 times.
boost::capy::task<unsigned long>::promise_type::transform_awaiter<boost::capy::immediate<boost::capy::io_result<> > >::await_resume():
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<unsigned long>::promise_type::transform_awaiter<boost::capy::immediate<boost::capy::io_result<unsigned long> > >::await_resume():
✗ Branch 0 not taken.
✓ Branch 1 taken 5 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 5 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_buffer_sink::commit(unsigned long)::awaitable>::await_resume():
✓ Branch 0 taken 34 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 34 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 34 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_buffer_sink::commit_eof(unsigned long)::awaitable>::await_resume():
✓ Branch 0 taken 32 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 32 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 32 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_buffer_sink::write_eof()::awaitable>::await_resume():
✓ Branch 0 taken 26 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 26 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 26 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_buffer_source::pull(std::span<boost::capy::const_buffer, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 80 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 80 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 80 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_read_source::read_some<boost::capy::mutable_buffer>(boost::capy::mutable_buffer)::awaitable>::await_resume():
✓ Branch 0 taken 46 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 46 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 46 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_read_source::read_some<std::array<boost::capy::mutable_buffer, 2ul> >(std::array<boost::capy::mutable_buffer, 2ul>)::awaitable>::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_read_stream::read_some<boost::capy::mutable_buffer>(boost::capy::mutable_buffer)::awaitable>::await_resume():
✓ Branch 0 taken 19 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 19 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 19 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_read_stream::read_some<std::array<boost::capy::mutable_buffer, 2ul> >(std::array<boost::capy::mutable_buffer, 2ul>)::awaitable>::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_read_stream::read_some<std::span<boost::capy::mutable_buffer const, 18446744073709551615ul> >(std::span<boost::capy::mutable_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_read_stream::read_some<std::span<boost::capy::mutable_buffer, 18446744073709551615ul> >(std::span<boost::capy::mutable_buffer, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 52 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 52 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 52 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_read_stream::read_some<std::vector<boost::capy::mutable_buffer, std::allocator<boost::capy::mutable_buffer> > >(std::vector<boost::capy::mutable_buffer, std::allocator<boost::capy::mutable_buffer> >)::awaitable>::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_write_sink::write_eof()::awaitable>::await_resume():
✓ Branch 0 taken 10 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 10 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 10 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_write_sink::write_some<boost::capy::const_buffer>(boost::capy::const_buffer)::awaitable>::await_resume():
✓ Branch 0 taken 40 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 40 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 40 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_write_stream::write_some<boost::capy::const_buffer>(boost::capy::const_buffer)::awaitable>::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_write_stream::write_some<std::array<boost::capy::const_buffer, 2ul> >(std::array<boost::capy::const_buffer, 2ul>)::awaitable>::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_write_stream::write_some<std::span<boost::capy::const_buffer const, 18446744073709551615ul> >(std::span<boost::capy::const_buffer const, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 8 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 8 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 8 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_write_stream::write_some<std::span<boost::capy::const_buffer, 18446744073709551615ul> >(std::span<boost::capy::const_buffer, 18446744073709551615ul>)::awaitable>::await_resume():
✓ Branch 0 taken 51 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 51 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 51 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::any_write_stream::write_some<std::vector<boost::capy::const_buffer, std::allocator<boost::capy::const_buffer> > >(std::vector<boost::capy::const_buffer, std::allocator<boost::capy::const_buffer> >)::awaitable>::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::async_event::wait_awaiter>::await_resume():
✗ Branch 0 not taken.
✓ Branch 1 taken 21 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 21 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::async_mutex::lock_awaiter>::await_resume():
✗ Branch 0 not taken.
✓ Branch 1 taken 28 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 28 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::async_mutex::lock_guard_awaiter>::await_resume():
✗ Branch 0 not taken.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 4 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::detail::read_until_awaitable<boost::capy::test::read_stream, boost::capy::basic_string_dynamic_buffer<char, std::char_traits<char>, std::allocator<char> >, boost::capy::match_delim, false> >::await_resume():
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 4 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 4 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::detail::read_until_awaitable<boost::capy::test::read_stream, boost::capy::basic_string_dynamic_buffer<char, std::char_traits<char>, std::allocator<char> >, boost::capy::match_delim, true> >::await_resume():
✓ Branch 0 taken 104 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 104 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 104 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::detail::read_until_awaitable<boost::capy::test::read_stream, boost::capy::basic_string_dynamic_buffer<char, std::char_traits<char>, std::allocator<char> >, boost::capy::read_until_test::testMatchCondition()::match_nth_newline, true> >::await_resume():
✓ Branch 0 taken 6 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 6 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 6 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::detail::read_until_awaitable<boost::capy::test::read_stream, boost::capy::basic_string_dynamic_buffer<char, std::char_traits<char>, std::allocator<char> >, boost::capy::read_until_test::testMatchCondition()::{lambda(std::basic_string_view<char, std::char_traits<char> >, unsigned long*)#1}, true> >::await_resume():
✓ Branch 0 taken 20 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 20 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 20 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::detail::read_until_awaitable<boost::capy::test::read_stream, boost::capy::basic_string_dynamic_buffer<char, std::char_traits<char>, std::allocator<char> >, boost::capy::read_until_test::testMatchCondition()::{lambda(std::basic_string_view<char, std::char_traits<char> >, unsigned long*)#2}, true> >::await_resume():
✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 2 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 2 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable<boost::capy::task<void>, true, std::pmr::memory_resource*> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable_ex<boost::capy::task<void>, boost::capy::test_executor, false, void> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::detail::run_awaitable_ex<boost::capy::test::custom_task<void>, boost::capy::test_executor, true, void> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::stop_only_awaitable, boost::capy::stop_only_awaitable> >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::detail::when_all_launcher<boost::capy::task<void>, boost::capy::task<void>, boost::capy::task<void> > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::self_destroy_awaitable>::await_resume():
✗ Branch 0 not taken.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✗ Branch 6 not taken.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::stop_only_awaitable>::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 4 not taken.
✓ Branch 5 taken 1 time.
✗ Branch 6 not taken.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::task<boost::capy::io_result<unsigned long> > >::await_resume():
✓ Branch 0 taken 1190 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1190 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 1190 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::task<int> >::await_resume():
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 2 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::task<std::tuple<boost::capy::io_result<> > > >::await_resume():
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::task<void> >::await_resume():
✓ Branch 0 taken 3 times.
✓ Branch 1 taken 4 times.
✗ Branch 3 not taken.
✓ Branch 4 taken 3 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 7 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::test::bufgrind<boost::capy::const_buffer>::next_awaitable>::await_resume():
✓ Branch 0 taken 799 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 799 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 799 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::test::bufgrind<boost::capy::mutable_buffer>::next_awaitable>::await_resume():
✓ Branch 0 taken 138 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 138 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 138 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::test::bufgrind<std::array<boost::capy::const_buffer, 3ul> >::next_awaitable>::await_resume():
✓ Branch 0 taken 7 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 7 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 7 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::test::read_stream::read_some<boost::capy::mutable_buffer>(boost::capy::mutable_buffer)::awaitable>::await_resume():
✓ Branch 0 taken 490 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 490 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 490 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::test::read_stream::read_some<std::array<boost::capy::mutable_buffer, 2ul> >(std::array<boost::capy::mutable_buffer, 2ul>)::awaitable>::await_resume():
✓ Branch 0 taken 162 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 162 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 162 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::test::write_stream::write_some<boost::capy::const_buffer>(boost::capy::const_buffer)::awaitable>::await_resume():
✓ Branch 0 taken 432 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 432 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 432 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::test::write_stream::write_some<boost::capy::mutable_buffer>(boost::capy::mutable_buffer)::awaitable>::await_resume():
✓ Branch 0 taken 166 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 166 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 166 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::test::write_stream::write_some<std::array<boost::capy::const_buffer, 2ul> >(std::array<boost::capy::const_buffer, 2ul>)::awaitable>::await_resume():
✓ Branch 0 taken 144 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 144 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 144 times.
boost::capy::task<void>::promise_type::transform_awaiter<boost::capy::write_now<boost::capy::test::write_stream>::op_type>::await_resume():
✓ Branch 0 taken 68 times.
✗ Branch 1 not taken.
✗ Branch 3 not taken.
✓ Branch 4 taken 68 times.
✗ Branch 5 not taken.
✓ Branch 6 taken 68 times.
|
7265 | if(fa && fa != current_frame_allocator()) |
| 204 | 10 | current_frame_allocator() = fa; | |
| 205 | 7265 | return a_.await_resume(); | |
| 206 | } | ||
| 207 | |||
| 208 | template<class Promise> | ||
| 209 | 2110 | auto await_suspend(std::coroutine_handle<Promise> h) noexcept | |
| 210 | { | ||
| 211 | 2110 | return a_.await_suspend(h, p_->environment()); | |
| 212 | } | ||
| 213 | }; | ||
| 214 | |||
| 215 | template<class Awaitable> | ||
| 216 | 7270 | auto transform_awaitable(Awaitable&& a) | |
| 217 | { | ||
| 218 | using A = std::decay_t<Awaitable>; | ||
| 219 | if constexpr (IoAwaitable<A>) | ||
| 220 | { | ||
| 221 | return transform_awaiter<Awaitable>{ | ||
| 222 | 9057 | std::forward<Awaitable>(a), this}; | |
| 223 | } | ||
| 224 | else | ||
| 225 | { | ||
| 226 | static_assert(sizeof(A) == 0, "requires IoAwaitable"); | ||
| 227 | } | ||
| 228 | 1787 | } | |
| 229 | }; | ||
| 230 | |||
| 231 | std::coroutine_handle<promise_type> h_; | ||
| 232 | |||
| 233 | /// Destroy the task and its coroutine frame if owned. | ||
| 234 | 8160 | ~task() | |
| 235 | { | ||
| 236 |
42/60boost::capy::task<bool>::~task():
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 19 times.
boost::capy::task<boost::capy::io_result<> >::~task():
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 20 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::~task():
✓ Branch 1 taken 1320 times.
✓ Branch 2 taken 1337 times.
boost::capy::task<double>::~task():
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 6 times.
boost::capy::task<int>::~task():
✓ Branch 1 taken 241 times.
✓ Branch 2 taken 1136 times.
boost::capy::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::~task():
✓ Branch 1 taken 8 times.
✓ Branch 2 taken 47 times.
boost::capy::task<std::pair<unsigned long, boost::capy::io_result<> > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
boost::capy::task<std::pair<unsigned long, int> >::~task():
✓ Branch 1 taken 5 times.
✓ Branch 2 taken 14 times.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<> > > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<>, int> > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<unsigned long> > > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<boost::capy::io_result<unsigned long>, int> > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
boost::capy::task<std::pair<unsigned long, std::variant<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, double> > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::pair<unsigned long, std::variant<int> > >::~task():
✓ Branch 1 taken 6 times.
✓ Branch 2 taken 33 times.
boost::capy::task<std::pair<unsigned long, std::variant<std::monostate, int> > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
boost::capy::task<std::pair<unsigned long, std::variant<std::monostate> > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
boost::capy::task<std::stop_token>::~task():
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 1 time.
boost::capy::task<std::tuple<boost::capy::io_result<> > >::~task():
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 1 time.
boost::capy::task<std::tuple<boost::capy::io_result<>, boost::capy::io_result<> > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::tuple<boost::capy::io_result<>, int> >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::tuple<int, boost::capy::io_result<unsigned long> > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::tuple<int, int, int, int, int, int, int, int> >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::tuple<int, int, int> >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
boost::capy::task<std::tuple<int, int> >::~task():
✓ Branch 1 taken 6 times.
✓ Branch 2 taken 20 times.
boost::capy::task<std::tuple<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::tuple<int> >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
boost::capy::task<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<unsigned long>::~task():
✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
boost::capy::task<void>::~task():
✓ Branch 1 taken 28 times.
✓ Branch 2 taken 3863 times.
|
8160 | if(h_) |
| 237 | 1622 | h_.destroy(); | |
| 238 | 8160 | } | |
| 239 | |||
| 240 | /// Return false; tasks are never immediately ready. | ||
| 241 | 1494 | bool await_ready() const noexcept | |
| 242 | { | ||
| 243 | 1494 | return false; | |
| 244 | } | ||
| 245 | |||
| 246 | /// Return the result or rethrow any stored exception. | ||
| 247 | 1619 | auto await_resume() | |
| 248 | { | ||
| 249 |
16/24boost::capy::task<bool>::await_resume():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<boost::capy::io_result<> >::await_resume():
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
boost::capy::task<boost::capy::io_result<unsigned long> >::await_resume():
✓ Branch 1 taken 479 times.
✓ Branch 2 taken 841 times.
boost::capy::task<double>::await_resume():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<int>::await_resume():
✓ Branch 1 taken 27 times.
✓ Branch 2 taken 212 times.
boost::capy::task<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::await_resume():
✗ Branch 1 not taken.
✓ Branch 2 taken 8 times.
boost::capy::task<std::pair<unsigned long, int> >::await_resume():
✗ Branch 1 not taken.
✓ Branch 2 taken 5 times.
boost::capy::task<std::pair<unsigned long, std::variant<int> > >::await_resume():
✗ Branch 1 not taken.
✓ Branch 2 taken 6 times.
boost::capy::task<std::stop_token>::await_resume():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::tuple<boost::capy::io_result<> > >::await_resume():
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
boost::capy::task<std::tuple<int, int> >::await_resume():
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 5 times.
boost::capy::task<void>::await_resume():
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 24 times.
|
1619 | if(h_.promise().has_ep_) |
| 250 | 510 | std::rethrow_exception(h_.promise().ep_); | |
| 251 | if constexpr (! std::is_void_v<T>) | ||
| 252 | 1085 | return std::move(*h_.promise().result_); | |
| 253 | else | ||
| 254 | 24 | return; | |
| 255 | } | ||
| 256 | |||
| 257 | /// Start execution with the caller's context. | ||
| 258 | 1606 | std::coroutine_handle<> await_suspend(std::coroutine_handle<> cont, io_env const* env) | |
| 259 | { | ||
| 260 | 1606 | h_.promise().set_continuation(cont); | |
| 261 | 1606 | h_.promise().set_environment(env); | |
| 262 | 1606 | return h_; | |
| 263 | } | ||
| 264 | |||
| 265 | /// Return the coroutine handle. | ||
| 266 | 2115 | std::coroutine_handle<promise_type> handle() const noexcept | |
| 267 | { | ||
| 268 | 2115 | return h_; | |
| 269 | } | ||
| 270 | |||
| 271 | /** Release ownership of the coroutine frame. | ||
| 272 | |||
| 273 | After calling this, destroying the task does not destroy the | ||
| 274 | coroutine frame. The caller becomes responsible for the frame's | ||
| 275 | lifetime. | ||
| 276 | |||
| 277 | @par Postconditions | ||
| 278 | `handle()` returns the original handle, but the task no longer | ||
| 279 | owns it. | ||
| 280 | */ | ||
| 281 | 2099 | void release() noexcept | |
| 282 | { | ||
| 283 | 2099 | h_ = nullptr; | |
| 284 | 2099 | } | |
| 285 | |||
| 286 | task(task const&) = delete; | ||
| 287 | task& operator=(task const&) = delete; | ||
| 288 | |||
| 289 | /// Move construct, transferring ownership. | ||
| 290 | 4439 | task(task&& other) noexcept | |
| 291 | 4439 | : h_(std::exchange(other.h_, nullptr)) | |
| 292 | { | ||
| 293 | 4439 | } | |
| 294 | |||
| 295 | /// Move assign, transferring ownership. | ||
| 296 | task& operator=(task&& other) noexcept | ||
| 297 | { | ||
| 298 | if(this != &other) | ||
| 299 | { | ||
| 300 | if(h_) | ||
| 301 | h_.destroy(); | ||
| 302 | h_ = std::exchange(other.h_, nullptr); | ||
| 303 | } | ||
| 304 | return *this; | ||
| 305 | } | ||
| 306 | |||
| 307 | private: | ||
| 308 | 3721 | explicit task(std::coroutine_handle<promise_type> h) | |
| 309 | 3721 | : h_(h) | |
| 310 | { | ||
| 311 | 3721 | } | |
| 312 | }; | ||
| 313 | |||
| 314 | } // namespace capy | ||
| 315 | } // namespace boost | ||
| 316 | |||
| 317 | #endif | ||
| 318 |