Skip to content

[SR-15873] Documentation for withUnsafeCurrentTask refers to non-existent property UnsafeCurrentTask.task #58138

@ole

Description

@ole
Previous ID SR-15873
Radar None
Original Reporter @ole
Type Bug
Environment

This is the state of the documentation at https://developer.apple.com/documentation/swift/3815003-withunsafecurrenttask on 2022-02-16 (Swift 5.5).

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug
Assignee None
Priority Medium

md5: d028dc708a057ae6830a4808d7cf2fd3

Issue Description:

The documentation for withUnsafeCurrentTask says: (edit: fixed link)

Instead, use the task property of UnsafeCurrentTask to access an instance of Task that you can store long-term and interact with outside of the closure body.

Problem: UnsafeCurrentTask has no public task property (and shouldn't as far as I can tell), so the documentation is incorrect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConcurrencуArea → standard library: The `Concurrency` module under the standard library umbrellabugA deviation from expected or documented behavior. Also: expected but undesirable behavior.documentationinaccurate infoBug → documentation: Inaccurate infostandard libraryArea: Standard library umbrella

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions