Skip to content

Commit f055bb5

Browse files
committed
[MOB-10319] Change lock to NSRecursiveLock to prevent deadlock on the same thread
1 parent 3c18793 commit f055bb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swift-sdk/Internal/ThreadSafeOrderedDictionary.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010

1111
public final class ThreadSafeOrderedDictionary<K: Hashable, V> {
1212
private var orderedDictionary = OrderedDictionary<K, V>()
13-
private let lock = NSLock()
13+
private let lock = NSRecursiveLock()
1414

1515
public var keys: [K] {
1616
lock.withLock {

0 commit comments

Comments
 (0)