Skip to content

🍒[ABI][Concurrency] introduce task options, and change ABI to accept them #37996

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

Closed
wants to merge 2 commits into from

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Jun 21, 2021

Explanation: ABI break to future proof the task creation ABI. Introduces TaskOptionRecords so we can extend spawning tasks in the future with other options. This is important to accept in ABI like this because we can then statically pass in the "right" executor for e.g. async let or other task creations allowing us to avoid unnecessary executor hopping.
Scope: Changes all Task creation APIs to accept options rather than custom made one off parameters for every type of optional thing we used to need.
Reviewed by: @DougGregor and @rjmccall in original PR
Radar/SR Issue: rdar://78931812
Risk: Medium, known/planned ABI break.
Testing: PR testing and CI on main.
Original PR: #37885

@ktoso ktoso requested a review from a team as a code owner June 21, 2021 04:16
@ktoso ktoso added the r5.5 label Jun 21, 2021
@ktoso ktoso force-pushed the pick-taskoptions branch from d9aa46e to da0858b Compare June 21, 2021 09:20
@swiftlang swiftlang deleted a comment from swift-ci Jun 21, 2021
@swiftlang swiftlang deleted a comment from swift-ci Jun 21, 2021
@ktoso
Copy link
Contributor Author

ktoso commented Jun 21, 2021

@swift-ci please test Linux Platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - da0858b9dc5e234c1619f068812920bdd4895445

@ktoso
Copy link
Contributor Author

ktoso commented Jun 21, 2021

@swift-ci nominate

@ktoso
Copy link
Contributor Author

ktoso commented Jun 21, 2021

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented Jun 21, 2021

@swift-ci please test
@swift-ci please nominate

@ktoso ktoso changed the title [ABI][Concurrency] introduce task options, and change ABI to accept them 🍒[ABI][Concurrency] introduce task options, and change ABI to accept them Jun 22, 2021
@ktoso
Copy link
Contributor Author

ktoso commented Jun 22, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - f0b3ced736d9675419770427577707c842f4562f

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - f0b3ced736d9675419770427577707c842f4562f

ktoso added 2 commits June 23, 2021 15:32
introduce new options parameter to all task spawning

[Concurrency] ABI for asynclet start to accept options

[Concurrency] fix unittest usages of changed task creation ABI

[Concurrency] introduce constants for parameter indexes in ownership

[Concurrency] fix test/SILOptimizer/closure_lifetime_fixup_concurrency.swift
@ktoso ktoso force-pushed the pick-taskoptions branch from 479bd1b to c3419a6 Compare June 23, 2021 06:33
@ktoso
Copy link
Contributor Author

ktoso commented Jun 23, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - c3419a6

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - c3419a6

@DougGregor
Copy link
Member

@swift-ci please test

@DougGregor
Copy link
Member

@swift-ci please nominate

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - c3419a6

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - c3419a6

@ktoso
Copy link
Contributor Author

ktoso commented Jun 24, 2021

@DougGregor pulled this into his work so does not need to be merged I think

@ktoso ktoso marked this pull request as draft June 24, 2021 13:34
@DougGregor
Copy link
Member

This is subsumed by #38076, so I'll close it out

@DougGregor DougGregor closed this Jun 24, 2021
@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
🍒 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