Skip to content

Commit 083afff

Browse files
ktosoamartini51
andauthored
Update stdlib/public/Concurrency/Task.swift
Co-authored-by: Alex Martini <[email protected]>
1 parent 6691dcf commit 083afff

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -695,12 +695,12 @@ extension Task where Success == Never, Failure == Never {
695695
/// Storing an unsafe reference doesn't affect the task's actual life cycle,
696696
/// and the behavior of accessing an unsafe task reference
697697
/// outside of the `withUnsafeCurrentTask(body:)` method's closure isn't defined.
698-
///
699-
/// If necessary to store a `Task` object itself, it is possible to create
700-
/// an un-structured task and store it, however it is not possible to retrieve
701-
/// the "current" task as an object. Instead, interactions with the "current"
702-
/// task are performed with the `currentPriority` and similar APIs which safely
703-
/// query the current task, without exposing its actual identity.
698+
/// There's no safe way to retrieve a reference to the current task
699+
/// and save it for long-term use.
700+
/// To query the current task without saving a reference to it,
701+
/// use properties like `currentPriority`.
702+
/// If you need to store a reference to a task,
703+
/// create an unstructured task using `Task.detached(priority:operation:)` instead.
704704
///
705705
/// - Parameters:
706706
/// - body: A closure that takes an `UnsafeCurrentTask` parameter.

0 commit comments

Comments
 (0)