Skip to content

Commit 51b2033

Browse files
committed
Fix more 'cancel(l)ed' style issues
1 parent 4a7ac28 commit 51b2033

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

stdlib/public/Concurrency/DiscardingTaskGroup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import Swift
2525
/// A group *always* waits for all of its child tasks
2626
/// to complete before it returns. Even canceled tasks must run until
2727
/// completion before this function returns.
28-
/// Cancelled child tasks cooperatively react to cancellation and attempt
28+
/// Canceled child tasks cooperatively react to cancellation and attempt
2929
/// to return as early as possible.
3030
/// After this function returns, the task group is always empty.
3131
///

stdlib/public/Concurrency/TaskCancellation.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ import Swift
3939
/// ### Execution order and semantics
4040
/// The `operation` closure is always invoked, even when the
4141
/// `withTaskCancellationHandler(operation:onCancel:)` method is called from a task
42-
/// that was already cancelled.
42+
/// that was already canceled.
4343
///
4444
/// When `withTaskCancellationHandler(operation:onCancel:)` is used in a task that has already been
45-
/// cancelled, the cancellation handler will be executed
45+
/// canceled, the cancellation handler will be executed
4646
/// immediately before the `operation` closure gets to execute.
4747
///
48-
/// This allows the cancellation handler to set some external "cancelled" flag
48+
/// This allows the cancellation handler to set some external "canceled" flag
4949
/// that the operation may be *atomically* checking for in order to avoid
5050
/// performing any actual work once the operation gets to run.
5151
///

stdlib/public/Concurrency/TaskGroup.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import Swift
1717
/// Starts a new scope that can contain a dynamic number of child tasks.
1818
///
1919
/// A group *always* waits for all of its child tasks
20-
/// to complete before it returns. Even cancelled tasks must run until
20+
/// to complete before it returns. Even canceled tasks must run until
2121
/// completion before this function returns.
22-
/// Cancelled child tasks cooperatively react to cancellation and attempt
22+
/// Canceled child tasks cooperatively react to cancellation and attempt
2323
/// to return as early as possible.
2424
/// After this function returns, the task group is always empty.
2525
///
@@ -342,14 +342,14 @@ public func _unsafeInheritExecutor_withThrowingTaskGroup<ChildTaskResult, GroupR
342342
/// A task group becomes canceled in one of the following ways:
343343
///
344344
/// - when ``cancelAll()`` is invoked on it,
345-
/// - when the ``Task`` running this task group is cancelled.
345+
/// - when the ``Task`` running this task group is canceled.
346346
///
347347
/// Since a `TaskGroup` is a structured concurrency primitive, cancellation is
348348
/// automatically propagated through all of its child-tasks (and their child
349349
/// tasks).
350350
///
351351
/// A canceled task group can still keep adding tasks, however they will start
352-
/// being immediately cancelled, and may act accordingly to this. To avoid adding
352+
/// being immediately canceled, and may act accordingly to this. To avoid adding
353353
/// new tasks to an already canceled task group, use ``addTaskUnlessCancelled(name:priority:body:)``
354354
/// rather than the plain ``addTask(name:priority:body:)`` which adds tasks unconditionally.
355355
///
@@ -551,14 +551,14 @@ extension TaskGroup: Sendable { }
551551
///
552552
/// - when ``cancelAll()`` is invoked on it,
553553
/// - when an error is thrown out of the `withThrowingTaskGroup(...) { }` closure,
554-
/// - when the ``Task`` running this task group is cancelled.
554+
/// - when the ``Task`` running this task group is canceled.
555555
///
556556
/// Since a `ThrowingTaskGroup` is a structured concurrency primitive, cancellation is
557557
/// automatically propagated through all of its child-tasks (and their child
558558
/// tasks).
559559
///
560560
/// A canceled task group can still keep adding tasks, however they will start
561-
/// being immediately cancelled, and may act accordingly to this. To avoid adding
561+
/// being immediately canceled, and may act accordingly to this. To avoid adding
562562
/// new tasks to an already canceled task group, use ``addTaskUnlessCancelled(priority:body:)``
563563
/// rather than the plain ``addTask(priority:body:)`` which adds tasks unconditionally.
564564
///
@@ -616,7 +616,7 @@ public struct ThrowingTaskGroup<ChildTaskResult: Sendable, Failure: Error> {
616616
/// Wait for all of the group's remaining tasks to complete.
617617
///
618618
/// If any of the tasks throw, the *first* error thrown is captured
619-
/// and re-thrown by this method although the task group is *not* cancelled
619+
/// and re-thrown by this method although the task group is *not* canceled
620620
/// when this happens.
621621
///
622622
/// ### Cancelling the task group on first error

stdlib/public/Concurrency/TaskSleepDuration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ extension Task where Success == Never, Failure == Never {
209209

210210
/// Suspends the current task for the given duration.
211211
///
212-
/// If the task is cancelled before the time ends, this function throws
212+
/// If the task is canceled before the time ends, this function throws
213213
/// `CancellationError`.
214214
///
215215
/// This function doesn't block the underlying thread.

0 commit comments

Comments
 (0)