@@ -388,7 +388,7 @@ struct dynamic_buffer { //
388
388
sender_of<dynamic_buffer> auto async_read_array(auto handle) { // 2
389
389
return just(dynamic_buffer{}) // 4
390
390
| let_value([handle] (dynamic_buffer& buf) { // 5
391
- return just(std::as_writeable_bytes(std::span(&buf.size, 1)) // 6
391
+ return just(std::as_writeable_bytes(std::span(&buf.size, 1))) // 6
392
392
| async_read(handle) // 7
393
393
| then( // 8
394
394
[&buf] (std::size_t bytes_read) { // 9
@@ -3196,29 +3196,16 @@ execution::sender auto just_stopped();
3196
3196
Returns a sender with no [=completion scheduler|completion schedulers=] , which
3197
3197
completes immediately by calling the receiver's `set_stopped`.
3198
3198
3199
- ### `execution::read ` ### {#design-sender-factory-read}
3199
+ ### `execution::read_env ` ### {#design-sender-factory-read}
3200
3200
3201
3201
<pre highlight="c++">
3202
- execution::sender auto read(auto tag);
3203
-
3204
- execution::sender auto get_scheduler() {
3205
- return read(execution::get_scheduler);
3206
- }
3207
- execution::sender auto get_delegation_scheduler() {
3208
- return read(execution::get_delegation_scheduler);
3209
- }
3210
- execution::sender auto get_allocator() {
3211
- return read(execution::get_allocator);
3212
- }
3213
- execution::sender auto get_stop_token() {
3214
- return read(execution::get_stop_token);
3215
- }
3202
+ execution::sender auto read_env(auto tag);
3216
3203
</pre>
3217
3204
3218
3205
Returns a sender that reaches into a receiver's environment and pulls out the
3219
3206
current value associated with the customization point denoted by `Tag`. It then
3220
3207
sends the value read back to the receiver through the value channel. For
3221
- instance, `get_scheduler()` (with no arguments) is a sender that asks the
3208
+ instance, `read_env(get_scheduler)` is a sender that asks the
3222
3209
receiver for the currently suggested `scheduler` and passes it to the receiver's
3223
3210
`set_value` completion-signal.
3224
3211
@@ -3228,7 +3215,7 @@ onto it.
3228
3215
3229
3216
<pre highlight="c++">
3230
3217
execution::sender auto task =
3231
- execution::get_scheduler( )
3218
+ execution::read_env(get_scheduler )
3232
3219
| execution::let_value([](auto sched) {
3233
3220
return execution::starts_on(sched, <i> some nested work here</i> );
3234
3221
});
@@ -3237,7 +3224,7 @@ onto it.
3237
3224
</pre>
3238
3225
3239
3226
This code uses the fact that `sync_wait` associates a scheduler with the
3240
- receiver that it connects with `task`. `get_scheduler( )` reads that scheduler
3227
+ receiver that it connects with `task`. `read_env(get_scheduler )` reads that scheduler
3241
3228
out of the receiver, and passes it to `let_value`'s receiver' s `set_value`
3242
3229
function, which in turn passes it to the lambda. That lambda returns a new
3243
3230
sender that uses the scheduler to schedule some nested work onto `sync_wait`'s
@@ -5325,7 +5312,7 @@ template<class Initializer>
5325
5312
<td> allow the specialization of the provided sender algorithms</td>
5326
5313
<td>
5327
5314
<ul>
5328
- <li> sender factories (e.g., `schedule`, `just`, `read `)</li>
5315
+ <li> sender factories (e.g., `schedule`, `just`, `read_env `)</li>
5329
5316
<li> sender adaptors (e.g., `continues_on`, `then`, `let_value`)</li>
5330
5317
<li> sender consumers (e.g., `start_detached`, `sync_wait`)</li>
5331
5318
</ul>
@@ -6001,10 +5988,6 @@ namespace std::execution {
6001
5988
3. `forwarding_query(get_allocator)` is a core constant expression and has value
6002
5989
`true`.
6003
5990
6004
- 4. `get_allocator()` (with no arguments) is expression-equivalent to
6005
- `execution::read(get_allocator)` ([exec.read] ).
6006
-
6007
-
6008
5991
6009
5992
### `get_stop_token` <b> [exec.get.stop.token] </b> ### {#spec-execution.get_stop_token}
6010
5993
@@ -6024,9 +6007,6 @@ namespace std::execution {
6024
6007
3. `forwarding_query(get_stop_token)` is a core constant
6025
6008
expression and has value `true`.
6026
6009
6027
- 4. `get_stop_token()` (with no arguments) is expression-equivalent to
6028
- `execution::read(get_stop_token)` ([exec.read] ).
6029
-
6030
6010
### `execution::get_env` <b> [exec.get.env] </b> ### {#spec-execution.environment.get_env}
6031
6011
6032
6012
1. `execution::get_env` is a customization point object. For a subexpression
@@ -6057,9 +6037,6 @@ namespace std::execution {
6057
6037
3. `forwarding_query(execution::get_domain)` is a core constant
6058
6038
expression and has value `true`.
6059
6039
6060
- 4. `get_domain()` (with no arguments) is expression-equivalent to
6061
- `execution::read(get_domain)` ([exec.read] ).
6062
-
6063
6040
### `execution::get_scheduler` <b> [exec.get.scheduler] </b> ### {#spec-execution.get_scheduler}
6064
6041
6065
6042
1. `get_scheduler` asks a queryable object for its associated scheduler.
@@ -6074,9 +6051,6 @@ namespace std::execution {
6074
6051
3. `forwarding_query(execution::get_scheduler)` is a core constant
6075
6052
expression and has value `true`.
6076
6053
6077
- 4. `get_scheduler()` (with no arguments) is expression-equivalent to
6078
- `execution::read(get_scheduler)` ([exec.read] ).
6079
-
6080
6054
### `execution::get_delegation_scheduler` <b> [exec.get.delegation.scheduler] </b> ### {#spec-execution.get_delegation_scheduler}
6081
6055
6082
6056
1. `get_delegation_scheduler` asks a queryable object for a scheduler that can be
@@ -6093,9 +6067,6 @@ namespace std::execution {
6093
6067
3. `forwarding_query(execution::get_delegation_scheduler)` is a core
6094
6068
constant expression and has value `true`.
6095
6069
6096
- 4. `get_delegation_scheduler()` (with no arguments) is expression-equivalent to
6097
- `execution::read(get_delegation_scheduler)` ([exec.read] ).
6098
-
6099
6070
### `execution::get_forward_progress_guarantee` <b> [exec.get.forward.progress.guarantee] </b> ### {#spec-execution.get_forward_progress_guarantee}
6100
6071
6101
6072
<pre highlight="c++">
@@ -7521,23 +7492,23 @@ namespace std::execution {
7521
7492
}
7522
7493
</pre>
7523
7494
7524
- #### `execution::read ` <b> [exec.read] </b> #### {#spec-execution.senders.read}
7495
+ #### `execution::read_env ` <b> [exec.read.env ] </b> #### {#spec-execution.senders.read.env }
7525
7496
7526
- 1. `read ` is a sender factory for a sender whose asynchronous operation
7497
+ 1. `read_env ` is a sender factory for a sender whose asynchronous operation
7527
7498
completes synchronously in its start operation with a value completion
7528
7499
result equal to a value read from the receiver's associated environment.
7529
7500
7530
- 2. `read ` is a customization point object. For some query object `q`,
7531
- the expression `read (q)` is expression-equivalent to
7532
- <code><i> make-sender</i> (read , q)</code> .
7501
+ 2. `read_env ` is a customization point object. For some query object `q`,
7502
+ the expression `read_env (q)` is expression-equivalent to
7503
+ <code><i> make-sender</i> (read_env , q)</code> .
7533
7504
7534
7505
3. The exposition-only class template <i> `impls-for`</i> ([exec.snd.general] )
7535
- is specialized for `read ` as follows:
7506
+ is specialized for `read_env ` as follows:
7536
7507
7537
7508
<pre highlight="c++">
7538
7509
namespace std::execution {
7539
7510
template<>
7540
- struct <i> impls-for</i> <<i> decayed-typeof</i> <read >> : <i> default-impls</i> {
7511
+ struct <i> impls-for</i> <<i> decayed-typeof</i> <read_env >> : <i> default-impls</i> {
7541
7512
static constexpr auto <em> start</em> =
7542
7513
[](auto query, auto& rcvr) noexcept -> void {
7543
7514
<i> TRY-SET-VALUE</i> (rcvr, query(get_env(rcvr)));
0 commit comments