-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add NSLock.withLock(_:)
method
#4736
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
@swift-ci test |
|
@swift-ci test |
All three pipelines failed with different errors. 😳 |
@swift-ci test |
@parkera Shall we do |
@parkera Is the automated test infrastructure behaving better these days? |
@swift-ci test |
😢 |
Fixes swiftlang#4735. Xcode 14 introduced the `NSLocking.withLock(_:)` method to the Darwin implementation of Foundation. This commit adds the new method to the open-source implementation. (Note: The [documentation](https://developer.apple.com/documentation/foundation/nslocking/4059821-withlock) incorrectly specifies the availability of the method as iOS 16+, etc. but it is actually available on all OS versions because it is marked [`@_alwaysEmitIntoClient`](https://github.com/apple/swift/blob/main/docs/ReferenceGuides/UnderscoredAttributes.md#_alwaysemitintoclient). The documentation bug is tracked by [FB11968310](https://feedbackassistant.apple.com/feedback/11968310).) I copied the implementation from `Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-ios.swiftinterface`.
@swift-ci test |
I hope there’s someone working full-time on making the automated test infrastructure more reliable. 😕 |
The macOS issue seems to be
The Windows issue is
|
😢 |
@swift-ci test |
All checks passed! |
Happy New Year! Merge, please. 😭 |
Fixes #4735.
Xcode 14 introduced the
NSLocking.withLock(_:)
method to the Darwin implementation of Foundation. This commit adds the new method to the open-source implementation.(Note: The documentation incorrectly specifies the availability of the method as iOS 16+, etc. but it is actually available on all OS versions because it is marked
@_alwaysEmitIntoClient
. The documentation bug is tracked by FB11968310.)I copied the implementation from
Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Foundation.framework/Modules/Foundation.swiftmodule/arm64e-apple-ios.swiftinterface
.