54 lines
2.2 KiB
Markdown
54 lines
2.2 KiB
Markdown
[exec.get.fwd.progress]
|
||
|
||
# 33 Execution control library [[exec]](./#exec)
|
||
|
||
## 33.5 Queries [[exec.queries]](exec.queries#exec.get.fwd.progress)
|
||
|
||
### 33.5.8 execution::get_forward_progress_guarantee [exec.get.fwd.progress]
|
||
|
||
namespace std::execution {enum class [forward_progress_guarantee](#lib:forward_progress_guarantee "33.5.8 execution::get_forward_progress_guarantee [exec.get.fwd.progress]") { concurrent,
|
||
parallel,
|
||
weakly_parallel };}
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1001)
|
||
|
||
get_forward_progress_guarantee asks a scheduler about
|
||
the forward progress guarantee of execution agents
|
||
created by that scheduler's associated execution resource ([[intro.progress]](intro.progress "6.10.2.3 Forward progress"))[.](#1.sentence-1)
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1006)
|
||
|
||
The name get_forward_progress_guarantee denotes a query object[.](#2.sentence-1)
|
||
|
||
For a subexpression sch, let Sch be decltype((sch))[.](#2.sentence-2)
|
||
|
||
If Sch does not satisfy [scheduler](exec.sched#concept:scheduler "33.6 Schedulers [exec.sched]"),get_forward_progress_guarantee is ill-formed[.](#2.sentence-3)
|
||
|
||
Otherwise,get_forward_progress_guarantee(sch) is expression-equivalent to:
|
||
|
||
- [(2.1)](#2.1)
|
||
|
||
*MANDATE-NOTHROW*(*AS-CONST*(sch).query(get_forward_progress_guarantee)),
|
||
if that expression is well-formed[.](#2.1.sentence-1)
|
||
*Mandates*: The type of the expression above is forward_progress_guarantee[.](#2.1.sentence-2)
|
||
|
||
- [(2.2)](#2.2)
|
||
|
||
Otherwise, forward_progress_guarantee::weakly_parallel[.](#2.2.sentence-1)
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1024)
|
||
|
||
If get_forward_progress_guarantee(sch) for some scheduler sch returns forward_progress_guarantee::concurrent,
|
||
all execution agents created by that scheduler's associated execution resource
|
||
shall provide the concurrent forward progress guarantee[.](#3.sentence-1)
|
||
|
||
If it returns forward_progress_guarantee::parallel,
|
||
all such execution agents
|
||
shall provide at least the parallel forward progress guarantee[.](#3.sentence-2)
|