-
Notifications
You must be signed in to change notification settings - Fork 129
Lock Improvements for [SR-12851] #130
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
Conversation
Please do not merge this without testing on Windows, it will break the s-p-m build. |
I am trying to figure the windows thing out right know. I can replace the pthread stuff with GCD. |
7cb4158
to
eec4846
Compare
The tests I've added for |
The property wrapper Alternatives considered:
|
f2eddd7
to
daa6525
Compare
@swift-ci please test |
@compnerd Do we have any separate Windows CI for TSC right now? |
…ot available on windows
daa6525
to
0318587
Compare
@swift-ci please smoke test |
The Swift project moved the default branch to More detail about the branch update - https://forums.swift.org/t/updating-branch-names/40412 |
This PR contains the following improvements to locks needed for SR-12851.
1. Added(Using GCD instead for windows compatiblity)ReadWriteLock
.2. Added property wrapper @ThreadLocal to address an issue where
FileLock
could be used in way that would unlock/lock the lock from another thread without the user realizing. --> MakingFileLock
thread safe3. Enabled
FileLock
to obtain an exclusive or a shared lock.