Skip to content

Update concurrency-safe notifications proposal (v4) #1295

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
merged 2 commits into from
May 15, 2025

Conversation

cthielen
Copy link
Contributor

This PR updates the Concurrency-Safe Notification Center proposal with requested enhancements from the initial review:

  • AsyncSequence-style observation
  • Automatic de-registration when ObservationToken goes out of scope

It also includes the following tweaks:

  • Message.Subject can now be Identifiable where Identifiable.ID == ObjectIdentifier in addition to AnyObject
  • post() function argument label changed from with to subject for clarity

@iCharlesHu
Copy link
Contributor

@swift-ci please test

@iCharlesHu iCharlesHu merged commit 2b26846 into swiftlang:main May 15, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants