Skip to content

[Concurrency] waitForAll and next of TaskGroups must inherit isolation #72794

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 3 commits into from
Apr 5, 2024

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Apr 3, 2024

Otherwise we get warnings when task groups are used within an actor. Add global actor tests to cover the specific situation:

Passing argument of non-sendable type 'inout ThrowingTaskGroup<Void, any Error>' outside of main actor-isolated context may introduce data races

To avoid this, we should keep the inherit the caller isolation.

resolves rdar://122846553

@ktoso ktoso requested a review from a team as a code owner April 3, 2024 08:57
@ktoso ktoso requested review from rjmccall, DougGregor, hborla and angela-laar and removed request for a team and rjmccall April 3, 2024 08:57
@ktoso ktoso added the concurrency Feature: umbrella label for concurrency language features label Apr 3, 2024
@ktoso
Copy link
Contributor Author

ktoso commented Apr 3, 2024

Unblocked by #72813

@ktoso ktoso force-pushed the wip-waitForAll-isolation branch from 37e0e08 to 48cd829 Compare April 4, 2024 10:07
@ktoso
Copy link
Contributor Author

ktoso commented Apr 4, 2024

@swift-ci please smoke test

ktoso added 2 commits April 4, 2024 19:13
Otherwise we get warnings when task groups are used within an actor.
Add global actor tests to cover the specific situation.

resolves rdar://122846553
@ktoso ktoso force-pushed the wip-waitForAll-isolation branch from 48cd829 to e8a61b9 Compare April 4, 2024 10:14
@ktoso
Copy link
Contributor Author

ktoso commented Apr 4, 2024

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented Apr 5, 2024

@swift-ci please smoke test

@ktoso ktoso enabled auto-merge (squash) April 5, 2024 04:04
@ktoso ktoso merged commit 3295ddd into swiftlang:main Apr 5, 2024
@ktoso ktoso deleted the wip-waitForAll-isolation branch April 5, 2024 07:08
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants