@@ -198,32 +198,32 @@ extension Task {
198198 ///
199199 /// Cancelling a task has three primary effects:
200200 ///
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.
203203 /// - 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,
205205 /// they also are triggered.
206206 ///
207207 /// Task cancellation is cooperative and idempotent.
208208 ///
209209 /// Cancelling a task does not automatically cause arbitrary functions on the task
210210 /// to stop running or throw errors. A function _may_ choose to react
211211 /// 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,
213213 /// 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.
218218 ///
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
220220 /// 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
222222 /// additional effect.
223223 ///
224224 /// `cancel` may need to acquire locks and synchronously run
225225 /// 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
227227 /// recommended that callers release any locks they might be
228228 /// holding before they call cancel.
229229 ///
0 commit comments