Merge pull request #3112 from heckj/unsafe_os_unfair_lock

fixing name of lock
This commit is contained in:
Brent Simmons 2021-05-10 12:29:23 -07:00 committed by GitHub
commit f9f5f09c60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,9 +16,9 @@ import RSCore
private var databaseIDCache = [String: String]()
private var databaseIDCacheLock = NSLock()
public func databaseIDWithString(_ s: String) -> String {
databaseIdCacheLock.lock()
databaseIDCacheLock.lock()
defer {
databaseIdCacheLock.unlock()
databaseIDCacheLock.unlock()
}
if let identifier = databaseIDCache[s] {