Skip to content

[Concurrency] Add compatibility overrides to Concurrency library. #36390

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 1 commit into from
Mar 24, 2021

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented Mar 10, 2021

Take the existing CompatibilityOverride mechanism and generalize it so it can be used in both the runtime and Concurrency libraries. The mechanism is preprocessor-heavy, so this requires some tricks. Use the SWIFT_TARGET_LIBRARY_NAME define to distinguish the libraries, and use a different .def file and mach-o section name accordingly.

We want the global/main executor functions to be a little more flexible. Instead of using the override mechanism, we expose function pointers that can be set by the compatibility library, or by any other code that wants to use a custom implementation.

rdar://73726764

@mikeash mikeash force-pushed the concurrency-compatibility-overrides branch from 81d13dd to 53a5b8f Compare March 17, 2021 19:34
@mikeash mikeash requested review from rjmccall and DougGregor March 17, 2021 20:26
@mikeash mikeash changed the title [WIP][Concurrency] Add compatibility overrides to Concurrency library. [Concurrency] Add compatibility overrides to Concurrency library. Mar 17, 2021
@mikeash mikeash marked this pull request as ready for review March 17, 2021 20:27
@mikeash mikeash force-pushed the concurrency-compatibility-overrides branch from 65fef2a to bac946b Compare March 18, 2021 19:44
@mikeash
Copy link
Contributor Author

mikeash commented Mar 18, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - bac946bda2c7af617467efe314a9fbb726f94c0b

@mikeash mikeash force-pushed the concurrency-compatibility-overrides branch from bac946b to ad1e6a4 Compare March 19, 2021 13:30
@mikeash
Copy link
Contributor Author

mikeash commented Mar 19, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ad1e6a48ed496eab003d17462945937a1f983dfa

@mikeash mikeash force-pushed the concurrency-compatibility-overrides branch from ad1e6a4 to e06a88a Compare March 19, 2021 15:32
@mikeash
Copy link
Contributor Author

mikeash commented Mar 19, 2021

@swift-ci please test

@mikeash
Copy link
Contributor Author

mikeash commented Mar 19, 2021

@swift-ci please test windows platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - e06a88a860e25d8202772417d2e79b9893f67b21

@mikeash mikeash force-pushed the concurrency-compatibility-overrides branch from e06a88a to 949694d Compare March 19, 2021 17:24
@mikeash
Copy link
Contributor Author

mikeash commented Mar 19, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 949694d4caa2baa30a121cd776abb937c864271c

@mikeash mikeash force-pushed the concurrency-compatibility-overrides branch from 949694d to 7bc4ea6 Compare March 19, 2021 18:04
@mikeash
Copy link
Contributor Author

mikeash commented Mar 19, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 7bc4ea698ceb4d7fcf4f25b13fe2273f3a9f1581

@mikeash mikeash force-pushed the concurrency-compatibility-overrides branch from 7bc4ea6 to 10fa783 Compare March 19, 2021 20:12
@mikeash
Copy link
Contributor Author

mikeash commented Mar 19, 2021

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 10fa783125e9cf83498bc30d01c744878fe7fd85

@mikeash mikeash force-pushed the concurrency-compatibility-overrides branch 2 times, most recently from be0cabf to 5f72d79 Compare March 22, 2021 14:41
Take the existing CompatibilityOverride mechanism and generalize it so it can be used in both the runtime and Concurrency libraries. The mechanism is preprocessor-heavy, so this requires some tricks. Use the SWIFT_TARGET_LIBRARY_NAME define to distinguish the libraries, and use a different .def file and mach-o section name accordingly.

We want the global/main executor functions to be a little more flexible. Instead of using the override mechanism, we expose function pointers that can be set by the compatibility library, or by any other code that wants to use a custom implementation.

rdar://73726764
@mikeash mikeash force-pushed the concurrency-compatibility-overrides branch from 5f72d79 to 6aab257 Compare March 22, 2021 15:09
@mikeash
Copy link
Contributor Author

mikeash commented Mar 22, 2021

@swift-ci please test

@mikeash
Copy link
Contributor Author

mikeash commented Mar 23, 2021

@swift-ci please smoke test and merge

@mikeash
Copy link
Contributor Author

mikeash commented Mar 23, 2021

@swift-ci please smoke test os x platform

2 similar comments
@mikeash
Copy link
Contributor Author

mikeash commented Mar 24, 2021

@swift-ci please smoke test os x platform

@mikeash
Copy link
Contributor Author

mikeash commented Mar 24, 2021

@swift-ci please smoke test os x platform

@mikeash mikeash merged commit c4e4e44 into swiftlang:main Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants