tmp/tmpy1m1gqcr/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Receiver proxies <a id="exec.sysctxrepl.recvproxy">[[exec.sysctxrepl.recvproxy]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
namespace std::execution::system_context_replaceability {
|
| 5 |
+
struct receiver_proxy {
|
| 6 |
+
virtual ~receiver_proxy() = default;
|
| 7 |
+
|
| 8 |
+
protected:
|
| 9 |
+
virtual bool query-env(unspecified) noexcept = 0; // exposition only
|
| 10 |
+
|
| 11 |
+
public:
|
| 12 |
+
virtual void set_value() noexcept = 0;
|
| 13 |
+
virtual void set_error(exception_ptr) noexcept = 0;
|
| 14 |
+
virtual void set_stopped() noexcept = 0;
|
| 15 |
+
|
| 16 |
+
template<class P, class-type Query>
|
| 17 |
+
optional<P> try_query(Query q) noexcept;
|
| 18 |
+
};
|
| 19 |
+
|
| 20 |
+
struct bulk_item_receiver_proxy : receiver_proxy {
|
| 21 |
+
virtual void execute(size_t, size_t) noexcept = 0;
|
| 22 |
+
};
|
| 23 |
+
}
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
`receiver_proxy` represents a receiver that will be notified by the
|
| 27 |
+
implementations of `parallel_scheduler_backend` to trigger the
|
| 28 |
+
completion operations. `bulk_item_receiver_proxy` is derived from
|
| 29 |
+
`receiver_proxy` and is used for `bulk_chunked` and `bulk_unchunked`
|
| 30 |
+
customizations that will also receive notifications from implementations
|
| 31 |
+
of `parallel_scheduler_backend` corresponding to different iterations.
|
| 32 |
+
|
| 33 |
+
``` cpp
|
| 34 |
+
template<class P, class-type Query>
|
| 35 |
+
optional<P> try_query(Query q) noexcept;
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
*Mandates:* `P` is a cv-unqualified non-array object type.
|
| 39 |
+
|
| 40 |
+
*Returns:* Let `env` be the environment of the receiver represented by
|
| 41 |
+
`*this`. If
|
| 42 |
+
|
| 43 |
+
- `Query` is not a member of an implementation-defined set of supported
|
| 44 |
+
queries; or
|
| 45 |
+
- `P` is not a member of an implementation-defined set of supported
|
| 46 |
+
result types for `Query`; or
|
| 47 |
+
- the expression `q(env)` is not well-formed or does not have type cv
|
| 48 |
+
`P`,
|
| 49 |
+
|
| 50 |
+
then returns `nullopt`. Otherwise, returns `q(env)`.
|
| 51 |
+
|
| 52 |
+
*Remarks:* `get_stop_token_t` is in the implementation-defined set of
|
| 53 |
+
supported queries, and `inplace_stop_token` is a member of the
|
| 54 |
+
implementation-defined set of supported result types for
|
| 55 |
+
`get_stop_token_t`.
|
| 56 |
+
|