@@ -198,32 +198,32 @@ extension Task {
198
198
///
199
199
/// Cancelling a task has three primary effects:
200
200
///
201
- /// - It flags the task as cancelled .
202
- /// - It causes any active cancellation handlers on the task to run ( once) .
201
+ /// - It flags the task as canceled .
202
+ /// - It causes any active cancellation handlers on the task to run, once.
203
203
/// - It cancels any child tasks and task groups of the task, including
204
- /// those created in the future. If those tasks have cancellation handlers,
204
+ /// those created in the future. If those tasks have cancellation handlers,
205
205
/// they also are triggered.
206
206
///
207
207
/// Task cancellation is cooperative and idempotent.
208
208
///
209
209
/// Cancelling a task does not automatically cause arbitrary functions on the task
210
210
/// to stop running or throw errors. A function _may_ choose to react
211
211
/// to cancellation by ending its work early, and it is conventional to
212
- /// signal that to callers by throwing CancellationError. However,
212
+ /// signal that to callers by throwing ` CancellationError` . However,
213
213
/// a function that doesn't specifically check for cancellation will
214
- /// run to completion normally even if the task it is running on is
215
- /// cancelled. (Of course, it may still end early if it calls something
216
- /// else that handles cancellation by throwing and then doesn't
217
- /// handle the error.)
214
+ /// run to completion normally, even if the task it is running on is
215
+ /// canceled. However, that function might still end early if it calls
216
+ /// other code that handles cancellation by throwing and that function doesn't
217
+ /// handle the error.
218
218
///
219
- /// It is safe to cancel a task from any task or thread. It is safe for
219
+ /// It's safe to cancel a task from any task or thread. It's safe for
220
220
/// multiple tasks or threads to cancel the same task at the same
221
- /// time. Cancelling a task that has already been cancelled has no
221
+ /// time. Cancelling a task that has already been canceled has no
222
222
/// additional effect.
223
223
///
224
224
/// `cancel` may need to acquire locks and synchronously run
225
225
/// arbitrary cancellation-handler code associated with the
226
- /// cancelled task. To reduce the risk of deadlock, it is
226
+ /// canceled task. To reduce the risk of deadlock, it is
227
227
/// recommended that callers release any locks they might be
228
228
/// holding before they call cancel.
229
229
///
0 commit comments