| 212 | Receiver receiver; |
| 213 | |
| 214 | operation(libdispatch_queue *queue_arg, Receiver rcvr) |
| 215 | : queue(*queue_arg) |
| 216 | , receiver(std::move(rcvr)) |
| 217 | { |
| 218 | this->execute = [](task_base *t) noexcept |
| 219 | { |
| 220 | auto &op = *static_cast<operation *>(t); |
| 221 | auto stoken = STDEXEC::get_stop_token(STDEXEC::get_env(op.receiver)); |
| 222 | if constexpr (STDEXEC::unstoppable_token<decltype(stoken)>) |
| 223 | { |
| 224 | STDEXEC::set_value(std::move(op.receiver)); |
| 225 | } |
| 226 | else if (stoken.stop_requested()) |
| 227 | { |
| 228 | STDEXEC::set_stopped(std::move(op.receiver)); |
| 229 | } |
| 230 | else |
| 231 | { |
| 232 | STDEXEC::set_value(std::move(op.receiver)); |
| 233 | } |
| 234 | }; |
| 235 | } |
| 236 | |
| 237 | void enqueue(task_base *op) const |
| 238 | { |
nothing calls this directly
no test coverage detected