Skip to content

Commit 0485190

Browse files
committed
Enhance thread safety tests by refining cache initialization and improving test clarity. Updated comments to reflect changes in locking mechanisms and added new test scenarios to validate cache behavior under high contention and mixed operations.
1 parent 13aa2b1 commit 0485190

File tree

2 files changed

+150
-637
lines changed

2 files changed

+150
-637
lines changed

Sources/Cache/Cache/Cache.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Foundation
1616
open class Cache<Key: Hashable, Value>: Cacheable, @unchecked Sendable {
1717

1818
/// Lock to synchronize the access to the cache dictionary.
19-
/// Using NSRecursiveLock to prevent deadlocks with @Published property wrapper
19+
/// Using NSRecursiveLock to prevent re-entrant lock deadlocks with @Published property wrapper
2020
fileprivate var lock: NSRecursiveLock
2121

2222
#if os(Linux) || os(Windows)

0 commit comments

Comments
 (0)