Skip to content

Update concurrency-safe notifications proposal (v4)#1295

Merged
iCharlesHu merged 2 commits intoswiftlang:mainfrom
cthielen:notification-proposal-update
May 15, 2025
Merged

Update concurrency-safe notifications proposal (v4)#1295
iCharlesHu merged 2 commits intoswiftlang:mainfrom
cthielen:notification-proposal-update

Conversation

@cthielen
Copy link
Copy Markdown
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
Copy Markdown
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