-
Notifications
You must be signed in to change notification settings - Fork 183
Add discussion of main actor and @globalActor [SE-0316] #366
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
Conversation
I'm moving this to its own branch, to write and review separately from the @mainactor updates.
This works around a known issue in DocC: swiftlang/swift-markdown#88 With the tilde underlines, @mainactor in code was being treated as a DocC at-directive, leading to incorrect output
This reverts most of commit f3e96e4. Removing the tildes is much better than nonbreaking spaces in code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass edits.
Edits from <rdar://150711369> Co-authored-by: Colleen Toporek <[email protected]>
Co-authored-by: John McCall <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, other than the typo I noticed. We really need to follow this up with a deeper discussion of sendability, but this is a good first step. @hborla may have thoughts.
Co-authored-by: John McCall <[email protected]>
With the changes from SE-0461, saying it runs as a nonisolated function doesn't tell you anything about where the task runs. Co-authored-by: Holly Borla <[email protected]> Co-authored-by: John McCall <[email protected]>
Thanks @rjmccall and @hborla! I agree that |
Partial revert of 9386927
As of SE-0442, withTaskGroup(...) can infer the child task's result type. Coalesced the return into a single statement because the compiler can't infer the nil value's type in the multi-return spelling, which would mean you still have to have the "of" and an explicit type. Co-authored-by: Konrad Malawski <[email protected]>
4245af3
to
96151bd
Compare
In the past, TSPL largely depended on the API reference for the MainActor type to document its use as an attribute. However, the role of the main actor is more important in the Swift 6.2 flavor of concurrency, so we need to discuss it in the book as part of the conceptual framing.
Fixes: rdar://80904458