This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
[exec.get.allocator]
# 33 Execution control library [[exec]](./#exec)
## 33.5 Queries [[exec.queries]](exec.queries#exec.get.allocator)
### 33.5.2 get_allocator [exec.get.allocator]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L861)
get_allocator asks a queryable object for its associated allocator[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L864)
The name get_allocator denotes a query object[.](#2.sentence-1)
For a subexpression env,get_allocator(env) is expression-equivalent to*MANDATE-NOTHROW*(*AS-CONST*(env).query(get_allocator))[.](#2.sentence-2)
*Mandates*: If the expression above is well-formed,
its type satisfies[*simple-allocator*](allocator.requirements.general#concept:simple-allocator "16.4.4.6.1General[allocator.requirements.general]") ([[allocator.requirements.general]](allocator.requirements.general "16.4.4.6.1General"))[.](#2.sentence-3)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L875)
forwarding_query(get_allocator) is a core constant expression and
has value true[.](#3.sentence-1)

View File

@@ -0,0 +1,28 @@
[exec.get.await.adapt]
# 33 Execution control library [[exec]](./#exec)
## 33.5 Queries [[exec.queries]](exec.queries#exec.get.await.adapt)
### 33.5.10 execution::get_await_completion_adaptor [exec.get.await.adapt]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1078)
get_await_completion_adaptor asks a queryable object for
its associated awaitable completion adaptor[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1082)
The name get_await_completion_adaptor denotes a query object[.](#2.sentence-1)
For a subexpression env,get_await_completion_adaptor(env) is expression-equivalent to*MANDATE-NOTHROW*(*AS-CONST*(env).query(get_await_completion_adaptor))
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1093)
forwarding_query(execution::get_await_completion_adaptor) is a core constant expression and has value true[.](#3.sentence-1)

View File

@@ -0,0 +1,50 @@
[exec.get.compl.sched]
# 33 Execution control library [[exec]](./#exec)
## 33.5 Queries [[exec.queries]](exec.queries#exec.get.compl.sched)
### 33.5.9 execution::get_completion_scheduler [exec.get.compl.sched]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1035)
get_completion_scheduler<*completion-tag>* obtains
the completion scheduler associated with a completion tag
from a sender's attributes[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1040)
The name get_completion_scheduler denotes a query object template[.](#2.sentence-1)
For a subexpression q,
the expression get_completion_scheduler<*completion-tag*>(q) is ill-formed if *completion-tag* is not one ofset_value_t, set_error_t, or set_stopped_t[.](#2.sentence-2)
Otherwise, get_completion_scheduler<*completion-tag*>(q) is expression-equivalent to*MANDATE-NOTHROW*(*AS-CONST*(q).query(get_completion_scheduler<*completion-tag*>))*Mandates*: If the expression above is well-formed,
its type satisfies [scheduler](exec.sched#concept:scheduler "33.6Schedulers[exec.sched]")[.](#2.sentence-3)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1055)
Let *completion-fn* be a completion function ([[exec.async.ops]](exec.async.ops "33.3Asynchronous operations"));
let *completion-tag* be
the associated completion tag of *completion-fn*;
let args be a pack of subexpressions; and
let sndr be a subexpression
such that [sender](exec.snd.concepts#concept:sender "33.9.3Sender concepts[exec.snd.concepts]")<decltype((sndr))> is true andget_completion_scheduler<*completion-tag*>(get_env(sndr)) is well-formed and denotes a scheduler sch[.](#3.sentence-1)
If an asynchronous operation
created by connecting sndr with a receiver rcvr causes the evaluation of *completion-fn*(rcvr, args...),
the behavior is undefined
unless the evaluation happens on an execution agent
that belongs to sch's associated execution resource[.](#3.sentence-2)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1071)
The expressionforwarding_query(get_completion_scheduler<*completion-tag*>) is a core constant expression and has value true[.](#4.sentence-1)

View File

@@ -0,0 +1,33 @@
[exec.get.delegation.scheduler]
# 33 Execution control library [[exec]](./#exec)
## 33.5 Queries [[exec.queries]](exec.queries#exec.get.delegation.scheduler)
### 33.5.7 execution::get_delegation_scheduler [exec.get.delegation.scheduler]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L970)
get_delegation_scheduler asks a queryable object for a scheduler
that can be used to delegate work to
for the purpose of forward progress delegation ([[intro.progress]](intro.progress "6.10.2.3Forward progress"))[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L975)
The name get_delegation_scheduler denotes a query object[.](#2.sentence-1)
For a subexpression env,get_delegation_scheduler(env) is expression-equivalent to*MANDATE-NOTHROW*(*AS-CONST*(env).query(get_delegation_scheduler))[.](#2.sentence-2)
*Mandates*: If the expression above is well-formed,
its type satisfies [scheduler](exec.sched#concept:scheduler "33.6Schedulers[exec.sched]")[.](#2.sentence-3)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L985)
forwarding_query(execution::get_delegation_scheduler) is
a core constant expression and has value true[.](#3.sentence-1)

View File

@@ -0,0 +1,29 @@
[exec.get.domain]
# 33 Execution control library [[exec]](./#exec)
## 33.5 Queries [[exec.queries]](exec.queries#exec.get.domain)
### 33.5.5 execution::get_domain [exec.get.domain]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L935)
get_domain asks a queryable object
for its associated execution domain tag[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L939)
The name get_domain denotes a query object[.](#2.sentence-1)
For a subexpression env,get_domain(env) is expression-equivalent to*MANDATE-NOTHROW*(*AS-CONST*(env).query(get_domain))[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L945)
forwarding_query(execution::get_domain) is
a core constant expression and has value true[.](#3.sentence-1)

42
cppdraft/exec/get/env.md Normal file
View File

@@ -0,0 +1,42 @@
[exec.get.env]
# 33 Execution control library [[exec]](./#exec)
## 33.5 Queries [[exec.queries]](exec.queries#exec.get.env)
### 33.5.4 execution::get_env [exec.get.env]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L906)
execution::get_env is a customization point object[.](#1.sentence-1)
For a subexpression o,execution::get_env(o) is expression-equivalent to:
- [(1.1)](#1.1)
*MANDATE-NOTHROW*(*AS-CONST*(o).get_env()) if that expression is well-formed[.](#1.1.sentence-1)
*Mandates*: The type of the expression above satisfies[*queryable*](exec.queryable.concept#concept:queryable "33.2.2queryable concept[exec.queryable.concept]") ([[exec.queryable]](exec.queryable "33.2Queries and queryables"))[.](#1.1.sentence-2)
- [(1.2)](#1.2)
Otherwise, env<>{}[.](#1.2.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L922)
The value of get_env(o) shall be valid while o is valid[.](#2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L925)
[*Note [1](#note-1)*:
When passed a sender object,get_env returns the sender's associated attributes[.](#3.sentence-1)
When passed a receiver,get_env returns the receiver's associated execution environment[.](#3.sentence-2)
— *end note*]

View File

@@ -0,0 +1,53 @@
[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.8execution::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.3Forward 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.6Schedulers[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)

View File

@@ -0,0 +1,31 @@
[exec.get.scheduler]
# 33 Execution control library [[exec]](./#exec)
## 33.5 Queries [[exec.queries]](exec.queries#exec.get.scheduler)
### 33.5.6 execution::get_scheduler [exec.get.scheduler]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L951)
get_scheduler asks a queryable object for its associated scheduler[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L954)
The name get_scheduler denotes a query object[.](#2.sentence-1)
For a subexpression env,get_scheduler(env) is expression-equivalent to*MANDATE-NOTHROW*(*AS-CONST*(env).query(get_scheduler))[.](#2.sentence-2)
*Mandates*: If the expression above is well-formed,
its type satisfies [scheduler](exec.sched#concept:scheduler "33.6Schedulers[exec.sched]")[.](#2.sentence-3)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L964)
forwarding_query(execution::get_scheduler) is
a core constant expression and has value true[.](#3.sentence-1)

View File

@@ -0,0 +1,37 @@
[exec.get.stop.token]
# 33 Execution control library [[exec]](./#exec)
## 33.5 Queries [[exec.queries]](exec.queries#exec.get.stop.token)
### 33.5.3 get_stop_token [exec.get.stop.token]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L881)
get_stop_token asks a queryable object for an associated stop token[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L884)
The name get_stop_token denotes a query object[.](#2.sentence-1)
For a subexpression env,get_stop_token(env) is expression-equivalent to:
- [(2.1)](#2.1)
*MANDATE-NOTHROW*(*AS-CONST*(env).query(get_stop_token)) if that expression is well-formed[.](#2.1.sentence-1)
*Mandates*: The type of the expression above satisfies [stoppable_token](stoptoken.concepts#concept:stoppable_token "32.3.3Stop token concepts[stoptoken.concepts]")[.](#2.1.sentence-2)
- [(2.2)](#2.2)
Otherwise, never_stop_token{}[.](#2.2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L900)
forwarding_query(get_stop_token) is a core constant expression and
has value true[.](#3.sentence-1)