[task.members] # 33 Execution control library [[exec]](./#exec) ## 33.13 Coroutine utilities [[exec.coro.util]](exec.coro.util#task.members) ### 33.13.6 execution​::​task [[exec.task]](exec.task#task.members) #### 33.13.6.3 task members [task.members] [🔗](#lib:task,constructor) `task(task&& other) noexcept; ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L7271) *Effects*: Initializes *handle* with exchange(other.*handle*,{})[.](#1.sentence-1) [🔗](#lib:task,destructor) `~task(); ` [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L7282) *Effects*: Equivalent to:if (*handle*)*handle*.destroy(); [🔗](#lib:connect,task) `template<[receiver](exec.recv.concepts#concept:receiver "33.7.1 Receiver concepts [exec.recv.concepts]") Rcvr> state connect(Rcvr&& recv); ` [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L7297) *Preconditions*: bool(*handle*) is true[.](#3.sentence-1) [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L7301) *Effects*: Equivalent to:return *state*(exchange(*handle*, {}), std::forward(recv));