Skip to content

🍒 [Concurrency] prevent races in task cancellation #38425

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
Jul 19, 2021

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Jul 16, 2021

Explanation: The way we triggered cancellation handlers on an already cancelled task was racy and may cause a handler not being triggered and potentially leaving resources never cleaned up. The new impl moves the checking in the right spot so we always trigger properly.
Reviewer: @rjmccall (reviewed original PR) @DougGregor
Radar/SR Issue: rdar://78177513
Risk: Small.
Testing: PR testing and CI on main.
Original PR: #38404

@ktoso ktoso requested a review from a team as a code owner July 16, 2021 02:25
@ktoso ktoso added the r5.5 label Jul 16, 2021
@ktoso
Copy link
Contributor Author

ktoso commented Jul 16, 2021

@swift-ci please test

@ktoso ktoso added the concurrency Feature: umbrella label for concurrency language features label Jul 16, 2021
@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - d9899cd

@ktoso
Copy link
Contributor Author

ktoso commented Jul 19, 2021

@swift-ci please test

@ktoso
Copy link
Contributor Author

ktoso commented Jul 19, 2021

Note to self, pull in #38469 if it proves indeed unbreaking the one flaky test

@ktoso ktoso requested review from rjmccall and DougGregor July 19, 2021 10:12
@ktoso
Copy link
Contributor Author

ktoso commented Jul 19, 2021

@swift-ci nominate

@ktoso ktoso merged commit bf57e39 into swiftlang:release/5.5 Jul 19, 2021
@ktoso ktoso deleted the pick-task-cancellation-double branch July 19, 2021 21:50
@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
concurrency Feature: umbrella label for concurrency language features 🍒 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