Files
2025-10-25 03:02:53 +03:00

27 lines
970 B
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[task.overview]
# 33 Execution control library [[exec]](./#exec)
## 33.13 Coroutine utilities [[exec.coro.util]](exec.coro.util#task.overview)
### 33.13.6 execution::task [[exec.task]](exec.task#task.overview)
#### 33.13.6.1 task overview [task.overview]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L7171)
The task class template represents a sender that can
be used as the return type of coroutines[.](#1.sentence-1)
The first template parameter T defines the type of the value
completion datum ([[exec.async.ops]](exec.async.ops "33.3Asynchronous operations")) if T is not void[.](#1.sentence-2)
Otherwise, there are no value completion datums[.](#1.sentence-3)
Inside coroutines returning task<T, E> the operand ofco_return (if any) becomes the argument of set_value[.](#1.sentence-4)
The second template parameter Environment is used to customize
the behavior of task[.](#1.sentence-5)