Skip to content

Commit 5cc62f1

Browse files
ktosojamieQ
andauthored
Update NNNN-task-cancellation-shields.md
Co-authored-by: Jamie <[email protected]>
1 parent 067bc6c commit 5cc62f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proposals/NNNN-task-cancellation-shields.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ await withDiscardingTaskGroup { group in
156156

157157
Swift concurrency offers task cancellation handlers which are invoked immediately when a task is cancelled. This allows you to dynamically react to cancellation happening without explicitly checking the `isCancelled` property of a task.
158158

159-
Task cancellation shields also prevent cancellation handlers from firing if the handler wasn't stored while a shield was active. Again, this does not extend to child tasks, but only to the current task that is being shielded.
159+
Task cancellation shields also prevent cancellation handlers from firing if the handler was stored while a shield was active. Again, this does not extend to child tasks, but only to the current task that is being shielded.
160160

161161
For example, the task cancellation shield installed around the `slowOperation` in the snippet below, would effectively prevent the cancellation handler inside the `slowOperation` function from ever triggering:
162162

0 commit comments

Comments
 (0)