Skip to content

Commit e6b7e2c

Browse files
committed
execution/run_loop: 微調整 (#1384)
1 parent 88bcec6 commit e6b7e2c

6 files changed

Lines changed: 33 additions & 2 deletions

File tree

reference/execution/execution/run_loop.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace std::execition {
1414
`run_loop`は、実行制御ライブラリの作業を[スケジュール](schedule.md)可能な実行リソース(execution resource)である。
1515
1616
内部的にスレッドセーフなFIFO (first-in first-out) 作業キューを保持する。
17-
[`run`メンバ関数](run_loop/run.md)はキューから作業を取り出し、同関数を呼び出したスレッド上のループで実行する
17+
[`run`メンバ関数](run_loop/run.md)はキューから作業を順次取り出し、同関数を呼び出すスレッド上で逐次実行する
1818
1919
`run_loop`インスタンスの動作説明のため、下記の説明用メンバ変数を持つ。
2020
@@ -32,7 +32,7 @@ namespace std::execition {
3232
| [`run`](run_loop/run.md) | キュー上の作業を逐次実行 | C++26 |
3333
| [`finish`](run_loop/finish.md) | 状態を終了中に変更 | C++26 |
3434
35-
## 説明専用のメンバ型
35+
## メンバ型
3636
3737
| 名前 | 説明 | 対応バージョン |
3838
|------|------|-------|
@@ -119,3 +119,4 @@ success
119119

120120
## 参照
121121
- [P2300R10 `std::execution`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2300r10.html)
122+
- [P3396R1 std::execution wording fixes](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3396r1.html)

reference/execution/execution/run_loop/finish.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ int main()
6363

6464
## 参照
6565
- [P2300R10 `std::execution`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2300r10.html)
66+
- [P3396R1 std::execution wording fixes](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3396r1.html)

reference/execution/execution/run_loop/get_scheduler.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,43 @@ run-loop-scheduler get_scheduler();
2020

2121
##
2222
```cpp example
23+
#include <cassert>
24+
#include <concepts>
2325
#include <execution>
2426
namespace ex = std::execution;
2527

2628
int main()
2729
{
2830
ex::run_loop loop;
2931
ex::scheduler auto sch = loop.get_scheduler();
32+
33+
// スケジュールSenderを作成
34+
ex::sender auto sndr = ex::schedule(sch);
35+
36+
// スケジュールSenderの完了シグネチャ集合を確認
37+
auto sigs = ex::get_completion_signatures(sndr);
38+
static_assert(std::same_as<decltype(sigs),
39+
ex::completion_signatures<ex::set_value_t(),
40+
ex::set_error_t(std::exception_ptr),
41+
ex::set_stopped_t()>>);
42+
43+
// スケジュールSender属性の値完了スケジューラを確認
44+
auto compl_sch = ex::get_completion_scheduler<ex::set_value_t>(ex::get_env(sndr));
45+
assert(compl_sch == sch);
3046
}
3147
```
3248
* get_scheduler()[color ff0000]
3349
* ex::run_loop[link ../run_loop.md]
3450
* ex::scheduler[link ../scheduler.md]
51+
* ex::sender[link ../sender.md]
52+
* ex::schedule[link ../schedule.md]
53+
* ex::get_completion_signatures[link ../get_completion_signatures.md]
54+
* ex::completion_signatures[link ../completion_signatures.md]
55+
* ex::set_value_t[link ../set_value.md]
56+
* ex::set_error_t[link ../set_error.md]
57+
* ex::set_stopped_t[link ../set_stopped.md]
58+
* ex::get_completion_scheduler[link ../get_completion_scheduler.md]
59+
* ex::get_env[link ../get_env.md]
3560
3661
### 出力
3762
```
@@ -51,6 +76,7 @@ int main()
5176
5277
## 関連項目
5378
- [`run-loop-scheduler`](run-loop-scheduler.md)
79+
- [`run-loop-sender`](run-loop-sender.md)
5480
- [`execution::schedule`](../schedule.md)
5581
5682

reference/execution/execution/run_loop/run-loop-opstate.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ struct run-loop-opstate-base { // exposition only
6767

6868
## 関連項目
6969
- [`run`](run.md)
70+
- [`execution::connect`](../connect.md)
7071
- [`execution::start`](../start.md)
7172

7273

reference/execution/execution/run_loop/run-loop-sender.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class run-loop-sender; // exposition only
2727
2828
2929
## 関連項目
30+
- [`get_scheduler`](get_scheduler.md)
3031
- [`run-loop-scheduler`](run-loop-scheduler.md)
3132
- [`execution::sender`](../sender.md)
3233

reference/execution/execution/run_loop/run.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,4 @@ finished
117117
118118
## 参照
119119
- [P2300R10 `std::execution`](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p2300r10.html)
120+
- [P3396R1 std::execution wording fixes](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3396r1.html)

0 commit comments

Comments
 (0)