Skip to content

[SE-0316] Introduce the GlobalActor protocol to describe global actors. #37930

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

Merged

Conversation

DougGregor
Copy link
Member

Explanation: Based on the discussion of SE-0316, introduce a GlobalActor protocol that describes types that can be global actors.
Scope: Affects the definition of global actors. The only one that currently exists is MainActor.
Radar/SR Issue: rdar://79339591
Risk: Very low.
Testing: PR testing and CI on main.
Original PR: #37917
Reviewed by: John McCall

Based on the discussion in the first review of the global actors
proposal, introduce a `GlobalActor` protocol that describes types that
can be global actors. Introduce this protocol, make `@globalActor`
types implicitly conform to it, and remove all of the bespoke
validation logic that was used to check the "shared" member.

Addresses rdar://79339591

(cherry picked from commit 8a068e0)
@DougGregor DougGregor requested a review from a team as a code owner June 15, 2021 18:54
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please nominate

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - fdba938

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - fdba938

@DougGregor
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 5457440

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 5457440

@DougGregor
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 924fbd6

@DougGregor
Copy link
Member Author

@swift-ci please test Linux

@airspeedswift airspeedswift merged commit fa26bf2 into swiftlang:release/5.5 Jun 16, 2021
@DougGregor DougGregor deleted the global-actor-protocol-5.5 branch June 16, 2021 15:54
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants