Skip to content

Commit 53db61c

Browse files
committed
execution: P3149R11 stop-when(#1510)
1 parent a93a451 commit 53db61c

File tree

9 files changed

+43
-39
lines changed

9 files changed

+43
-39
lines changed

reference/execution/execution/counting_scope.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace std::execution {
1818
1919
- `count` : `size_t`型の関連付けカウント値
2020
- `state` : `scope-state-type`列挙型(後述)の状態
21-
- `s_source` : [`inplace_stop_source`](/reference/stop_token/inplace_stop_source.md)型の停止要求管理オブジェクト
21+
- `s_source` : [`inplace_stop_source`](/reference/stop_token/inplace_stop_source.md)型の停止要求管理オブジェクト
2222
2323
2424
## メンバ関数

reference/execution/execution/counting_scope/disassociate.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ void disassociate() noexcept; // exposition only
3131
### 言語
3232
- C++26
3333

34-
### 処理系
35-
- [Clang](/implementation.md#clang): ??
36-
- [GCC](/implementation.md#gcc): ??
37-
- [ICC](/implementation.md#icc): ??
38-
- [Visual C++](/implementation.md#visual_cpp): ??
39-
4034

4135
## 参照
4236
- [P3149R11 `async_scope` - Creating scopes for non-sequential concurrency](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3149r11.html)

reference/execution/execution/counting_scope/start-join-sender.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,5 @@ bool start-join-sender(State& st) noexcept; // exposition only
3131
### 言語
3232
- C++26
3333

34-
### 処理系
35-
- [Clang](/implementation.md#clang): ??
36-
- [GCC](/implementation.md#gcc): ??
37-
- [ICC](/implementation.md#icc): ??
38-
- [Visual C++](/implementation.md#visual_cpp): ??
39-
40-
4134
## 参照
4235
- [P3149R11 `async_scope` - Creating scopes for non-sequential concurrency](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3149r11.html)

reference/execution/execution/counting_scope/token/wrap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sender auto wrap(Sender&& snd) const
2323
```cpp
2424
return stop-when(std::forward<Sender>(snd), scope->s_source.get_token());
2525
```
26-
* stop-when[link stop-when.md.nolink]
26+
* stop-when[link ../../stop-when.md]
2727
* get_token()[link /reference/stop_token/stop_source/get_token.md]
2828

2929

reference/execution/execution/counting_scope/try-associate.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ bool try-associate() noexcept; // exposition only
3535
### 言語
3636
- C++26
3737

38-
### 処理系
39-
- [Clang](/implementation.md#clang): ??
40-
- [GCC](/implementation.md#gcc): ??
41-
- [ICC](/implementation.md#icc): ??
42-
- [Visual C++](/implementation.md#visual_cpp): ??
43-
4438

4539
## 参照
4640
- [P3149R11 `async_scope` - Creating scopes for non-sequential concurrency](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3149r11.html)

reference/execution/execution/simple_counting_scope/disassociate.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ void disassociate() noexcept; // exposition only
3131
### 言語
3232
- C++26
3333

34-
### 処理系
35-
- [Clang](/implementation.md#clang): ??
36-
- [GCC](/implementation.md#gcc): ??
37-
- [ICC](/implementation.md#icc): ??
38-
- [Visual C++](/implementation.md#visual_cpp): ??
39-
4034

4135
## 参照
4236
- [P3149R11 `async_scope` - Creating scopes for non-sequential concurrency](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3149r11.html)

reference/execution/execution/simple_counting_scope/start-join-sender.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ bool start-join-sender(State& st) noexcept; // exposition only
3131
### 言語
3232
- C++26
3333

34-
### 処理系
35-
- [Clang](/implementation.md#clang): ??
36-
- [GCC](/implementation.md#gcc): ??
37-
- [ICC](/implementation.md#icc): ??
38-
- [Visual C++](/implementation.md#visual_cpp): ??
39-
4034

4135
## 参照
4236
- [P3149R11 `async_scope` - Creating scopes for non-sequential concurrency](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3149r11.html)

reference/execution/execution/simple_counting_scope/try-associate.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ bool try-associate() noexcept; // exposition only
3535
### 言語
3636
- C++26
3737

38-
### 処理系
39-
- [Clang](/implementation.md#clang): ??
40-
- [GCC](/implementation.md#gcc): ??
41-
- [ICC](/implementation.md#icc): ??
42-
- [Visual C++](/implementation.md#visual_cpp): ??
43-
4438

4539
## 参照
4640
- [P3149R11 `async_scope` - Creating scopes for non-sequential concurrency](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3149r11.html)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# stop-when
2+
* execution[meta header]
3+
* cpo[meta id-type]
4+
* std::execution[meta namespace]
5+
* cpp26[meta cpp]
6+
7+
```cpp
8+
namespace std::execution {
9+
inline constexpr unspecified stop-when{};
10+
}
11+
```
12+
* unspecified[italic]
13+
14+
# 概要
15+
`stop-when`は、入力[Sender](sender.md)に追加の[停止トークン](/reference/stop_token/stop_token.md)を結合したSenderを返す、説明専用のSenderアダプタである。
16+
17+
説明用の式`sndr`と`token`に対して、
18+
19+
- `decltype((sndr))`が[`sender`](sender.md)を満たさない、もしくは[`remove_cvref_t`](/reference/type_traits/remove_cvref.md)`<decltype((token))>`が[`stoppable_token`](/reference/stop_token/stoppable_token.md)を満たさないとき、式`stop-token(sndr, token)`は不適格となる。
20+
- そうでなく、[`remove_cvref_t`](/reference/type_traits/remove_cvref.md)`<decltype((token))>`が[`unstoppable_token`](/reference/stop_token/unstoppable_token.md)のモデルであるとき、式`stop-token(sndr, token)`は`sndr`と等価となる。
21+
- そうでないとき、式`stop-token(sndr, token)`はSender`osndr`を返す。`osndr`が[Receiver](receiver.md)`r`と[接続(connect)](connect.md)されるとき、[`get_stop_token`](../get_stop_token.md)`(`[`get_env`](get_env.md)`(r))`の結果を`rtoken`とする。
22+
- `rtoken`の型が[`unstoppable_token`](/reference/stop_token/unstoppable_token.md)のモデルであるとき、`osdnr`と`r`との接続の効果は[`connect`](connect.md)`(`[`write_env`](write_env.md)`(sndr,` [`prop`](prop.md)`(`[`get_stop_token`](../get_stop_token.md)`, token)), r)`に等しい。
23+
- そうでないとき、下記のような説明専用の型`stoken-t`の`stoken`オブジェクトに対して、`osdnr`と`r`との接続の効果は[`connect`](connect.md)`(`[`write_env`](write_env.md)`(sndr,` [`prop`](prop.md)`(`[`get_stop_token`](../get_stop_token.md)`, stoken)), r)`に等しい。
24+
- `stoken-t`は[`stoppable_token`](/reference/stop_token/stoppable_token.md)のモデルである。
25+
- `stoken.stop_requested()`は`token.stop_requested() || rtoken.stop_requested()`を返す。
26+
- `stoken.stop_possible()`は`token.stop_possible() || rtoken.stop_possible()`を返す。
27+
- 説明用の型`Fn`と`Init`が[`invocable`](/reference/concepts/invocable.md)`<Fn>`および[`constructible_from`](/reference/concepts/constructible_from.md)`<Fn, Init>`のモデルであるとき、`stoken-t::callback_type<Fn>`は[`stoppable-callback-for`](/reference/stop_token/stoppable_token.md)のモデルである。
28+
29+
30+
## バージョン
31+
### 言語
32+
- C++26
33+
34+
35+
## 関連項目
36+
- [`execution::spawn_future`](spawn_future.md.nolink)
37+
- [`execution::counting_scope::token::wrap`](counting_scope/token/wrap.md)
38+
39+
40+
## 参照
41+
- [P3149R11 `async_scope` - Creating scopes for non-sequential concurrency](https://open-std.org/jtc1/sc22/wg21/docs/papers/2025/p3149r11.html)

0 commit comments

Comments
 (0)