Skip to content

[6.2][stdlib] SE-0472: Rename Task and*TaskGroup APIs to match the proposal #81488

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

Open
wants to merge 4 commits into
base: release/6.2
Choose a base branch
from

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 13, 2025

Cherry-pick of #80821 and #81428


ktoso and others added 4 commits May 13, 2025 13:24
Previously there was still a sneaky hop which caused ordering issues.
This introduced a specific test startSynchronously_order which checks
that the task enqueues indeed are "immediate" and cleans up how we
handle this.

This also prepares for the being discussed in SE review direction of
this API that it SHOULD be ALLOWED to actually hop and NOT be
synchronous at all IF the isolation is specified on the closure and is
DIFFERENT than the callers dynamic isolation.

This effectively implements "synchronously run right now if dynamically
on the exact isolation as requested by the closure; otherwise enqueue
the task as usual".

resolves rdar://149284186
cc @drexin

(cherry picked from commit a24a28c)
…posal

`Task.startSynchronously` -> `Task.immediate`
`*TaskGroup.startTaskSynchronously{UnlessCancelled}` -> `*TaskGroup.addImmediateTask{UnlessCancelled}`

(cherry picked from commit 001eab8)
@xedin xedin requested a review from a team as a code owner May 13, 2025 20:30
@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels May 13, 2025
@xedin
Copy link
Contributor Author

xedin commented May 13, 2025

@swift-ci please test

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 swift 6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants