Skip to content

6.0🍒[Observation] Optimize cancellation path to avoid excessive copies #73356

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

phausler
Copy link
Contributor

Explanation: The existing code could potentially mis-optimize and create copies of the set for the cancellation tokens. This mutates it in-place to avoid those copies.

Radar: rdar://127018986

Scope: Only applies to the cancellation path inside of the Observation library

Risk: low - there are no functional changes in how the compiler is built

Testing: unit tests cover this particular case

Reviewed By: @glessard in #73288

@phausler phausler requested a review from stephentyrone April 30, 2024 21:46
@phausler phausler requested a review from a team as a code owner April 30, 2024 21:46
@phausler phausler added the 🍒 release cherry pick Flag: Release branch cherry picks label Apr 30, 2024
@phausler phausler changed the title [Observation] Optimize cancellation path to avoid excessive copies 6.0🍒[Observation] Optimize cancellation path to avoid excessive copies Apr 30, 2024
@stephentyrone
Copy link
Contributor

@swift-ci test

@phausler phausler merged commit e89eb31 into swiftlang:release/6.0 May 2, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants