Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ole opened this issue Feb 16, 2022 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. Concurrencу Area → standard library: The `Concurrency` module under the standard library umbrella documentation inaccurate info Bug → documentation: Inaccurate info standard library Area: Standard library umbrella

Comments

@ole
Copy link
Contributor

ole commented Feb 16, 2022

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.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@ole
Copy link
Contributor Author

ole commented Apr 26, 2022

This issue still exists as of 2022-04-26. The documentation is wrong, whereas the doc comment in the Swift source code is much better:

/// There's no safe way to retrieve a reference to the current task
/// and save it for long-term use.

@ole
Copy link
Contributor Author

ole commented Feb 2, 2024

Closing as fixed. The problematic sentence is no longer there in the documentation.

@ole ole closed this as completed Feb 2, 2024
@AnthonyLatsis AnthonyLatsis added documentation inaccurate info Bug → documentation: Inaccurate info Concurrencу Area → standard library: The `Concurrency` module under the standard library umbrella labels Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. Concurrencу Area → standard library: The `Concurrency` module under the standard library umbrella documentation inaccurate info Bug → documentation: Inaccurate info standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

2 participants