File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -679,7 +679,7 @@ Task {
679
679
// Hello Guest, user ID 97
680
680
```
681
681
682
- 平行コードを構造化するために 、タスクグループ\( _ task group_ \) を使います。
682
+ 同時並行コードを構造化するために 、タスクグループ\( _ task group_ \) を使います。
683
683
684
684
``` swift
685
685
let userIDs = await withTaskGroup (of : Int .self ) { taskGroup in
@@ -712,20 +712,6 @@ actor ServerConnection {
712
712
}
713
713
```
714
714
715
- <!--
716
- - test: `guided-tour`
717
- ```swifttest
718
- -> actor Oven {
719
- var contents: [String] = []
720
- func bake(_ food: String) -> String {
721
- contents.append(food)
722
- // ... wait for food to bake ...
723
- return contents.removeLast()
724
- }
725
- }
726
- ```
727
- -->
728
-
729
715
アクターのメソッドを呼び出す、もしくはそのプロパティの 1 つにアクセスする時に、
730
716
そのアクター上で実行している他のコードが完了するのを待つことを示すために ` await ` をつける必要があります。
731
717
@@ -734,14 +720,6 @@ let server = ServerConnection()
734
720
let userID = await server.connect ()
735
721
```
736
722
737
- <!--
738
- - test: `guided-tour`
739
- ```swifttest
740
- -> let oven = Oven()
741
- -> let biscuits = await oven.bake("biscuits")
742
- ```
743
- -->
744
-
745
723
## プロトコルと拡張\( Protocols and Extensions\)
746
724
747
725
プロトコルを宣言するために ` protocol ` を使います。
You can’t perform that action at this time.
0 commit comments