File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -695,9 +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- /// Instead, use the `task` property of `UnsafeCurrentTask`
699- /// to access an instance of `Task` that you can store long-term
700- /// and interact with outside of the closure body.
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.
701704///
702705/// - Parameters:
703706/// - body: A closure that takes an `UnsafeCurrentTask` parameter.
You can’t perform that action at this time.
0 commit comments