Skip to content

fix race condition with TSCUtility.Platform::darwinCacheDirectories #3151

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
Jan 5, 2021

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Dec 27, 2020

motivation: TSCUtility.Platform::darwinCacheDirectories is not thread-safe, can cause race condition when accessing concurrently

changes: wrap TSCUtility.Platform::darwinCacheDirectories with ThreadSafeArrayStore

motivation: TSCUtility.Platform::darwinCacheDirectories is not thread-safe, can cause race condition when accessing concurrently

changes: wrap TSCUtility.Platform::darwinCacheDirectories with ThreadSafeArrayStore
@tomerd
Copy link
Contributor Author

tomerd commented Dec 27, 2020

@swift-ci please smoke test

@tomerd tomerd self-assigned this Dec 27, 2020
@tomerd
Copy link
Contributor Author

tomerd commented Dec 28, 2020

hmm linker error, maybe CI is busted. @swift-ci please smoke test OS X Platform

@abertelrud
Copy link
Contributor

This looks good, but would it be better to fix TSC's method to be thread safe so other clients would benefit too?

@tomerd
Copy link
Contributor Author

tomerd commented Jan 5, 2021

This looks good, but would it be better to fix TSC's method to be thread safe so other clients would benefit too?

yes this is my plan

@tomerd
Copy link
Contributor Author

tomerd commented Jan 5, 2021

@swift-ci please smoke test macOS Platform

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Jan 5, 2021
@tomerd tomerd merged commit d6b0d16 into swiftlang:main Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants