33 Execution control library [exec] (original) (raw)
33.13 Coroutine utilities [exec.coro.util]
33.13.6 execution​::​task [exec.task]
33.13.6.3 task members [task.members]
task(task&& other) noexcept;
Effects: Initializes handle with exchange(other.handle,{}).
~task();
Effects: Equivalent to:if (handle) handle.destroy();
template<[receiver](exec.recv.concepts#concept:receiver "33.7.1 Receiver concepts [exec.recv.concepts]") Rcvr> _state_<Rcvr> connect(Rcvr&& recv) &&;
Preconditions: bool(handle) is true.
Effects: Equivalent to:return state<Rcvr>(exchange(handle, {}), std::forward<Rcvr>(recv));