Skip to content

Remove use of deprecated STSC 'Lock' #1160

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
Aug 23, 2022
Merged

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Aug 23, 2022

  • SwiftScan use of it seems not needed anymore
  • ArgsResolver use can use 'NSLock' directly

@artemcm
Copy link
Contributor Author

artemcm commented Aug 23, 2022

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Aug 23, 2022

@swift-ci test


fileprivate extension NSLock {
/// Execute the given block while holding the lock.
func withLock<T> (_ body: () throws -> T) rethrows -> T {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add a note to keep this in sync with SPM?

- SwiftScan use of it seems not needed anymore
- ArgsResolver use can use 'NSLock' directly
@artemcm
Copy link
Contributor Author

artemcm commented Aug 23, 2022

@swift-ci test

@artemcm artemcm merged commit c40cbd5 into swiftlang:main Aug 23, 2022
@artemcm artemcm deleted the LockFix branch August 23, 2022 17:54
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