@@ -555,7 +555,7 @@ Each task in a given task group has the same parent task,
555555and each task can have child tasks.
556556Because of the explicit relationship between tasks and task groups,
557557this approach is called * structured concurrency* .
558- The explicit parent-child relationships between tasks has several advantages:
558+ The explicit parent-child relationship between tasks has several advantages:
559559
560560- In a parent task,
561561 you can't forget to wait for its child tasks to complete.
@@ -590,7 +590,7 @@ The code above creates a new task group,
590590and then creates child tasks
591591to download each photo in the gallery.
592592Swift runs as many of these tasks concurrently as conditions allow.
593- As soon a child task finishes downloading a photo,
593+ As soon as a child task finishes downloading a photo,
594594that photo is displayed.
595595There's no guarantee about the order that child tasks complete,
596596so the photos from this gallery can be shown in any order.
@@ -669,7 +669,7 @@ Downloading pictures could take a long time
669669if the pictures are large or the network is slow.
670670To let the user stop this work,
671671without waiting for all of the tasks to complete,
672- the tasks need check for cancellation and stop running if they are canceled.
672+ the tasks need to check for cancellation and stop running if they are canceled.
673673There are two ways a task can do this:
674674by calling the [ ` Task.checkCancellation() ` ] [ ] type method,
675675or by reading the [ ` Task.isCancelled ` ] [ `Task.isCancelled` type ] type property.
@@ -1092,7 +1092,7 @@ The code above is similar to
10921092but the code in this example doesn't wait for the UI update.
10931093You can also write ` @MainActor ` on a structure, class, or enumeration
10941094to ensure all of its methods and all access to its properties
1095- to run on the main actor:
1095+ run on the main actor:
10961096
10971097``` swift
10981098@MainActor
@@ -1106,7 +1106,7 @@ The `PhotoGallery` structure in the code above
11061106draws the photos on screen,
11071107using the names from its ` photoNames ` property
11081108to determine which photos to display.
1109- Because ` photoNames ` effects the UI,
1109+ Because ` photoNames ` affects the UI,
11101110code that changes it needs to run on the main actor
11111111to serialize that access.
11121112
@@ -1369,7 +1369,7 @@ during that period of time.
13691369In the future,
13701370if you try to add concurrent code to this function,
13711371introducing a possible suspension point,
1372- you'll get compile-time error instead of introducing a bug.
1372+ you'll get a compile-time error instead of introducing a bug.
13731373
13741374
13751375## Global Actors
@@ -1379,7 +1379,7 @@ An actor can normally have multiple instances,
13791379each of which provides independent isolation.
13801380This is why you declare all of an actor's isolated data
13811381as instance properties of that actor.
1382- However, because ` MainActor ` is singleton ---
1382+ However, because ` MainActor ` is a singleton ---
13831383there is only ever a single instance of this type ---
13841384the type alone is sufficient to identify the actor,
13851385allowing you to mark main-actor isolation using just an attribute.
0 commit comments