[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<Rcvr> 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*<Rcvr>(exchange(*handle*, {}), std::forward<Rcvr>(recv));
