Attempts to acquire a lock if the receiver’s condition is equal to the specified condition.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
YES if the lock could be acquired,
As part of its implementation, this method invokes
lock. This method returns immediately.