Skip to content

Commit a3994ec

Browse files
committed
Document parameters and at-most-once semantics
1 parent 77db003 commit a3994ec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/public/Concurrency/TaskCancellation.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ import Swift
1717
/// Execute an operation with a cancellation handler that's immediately
1818
/// invoked if the current task is canceled.
1919
///
20+
/// - Parameters:
21+
/// - operation: The operation to perform.
22+
/// - handler: A closure to execute, once, if the operation is canceled.
23+
/// - isolation: The actor that the operation and cancellation handler are isolated to.
24+
///
2025
/// This differs from the operation cooperatively checking for cancellation
2126
/// and reacting to it in that the cancellation handler is _always_ and
2227
/// _immediately_ invoked when the task is canceled. For example, even if the

0 commit comments

Comments
 (0)