Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Split/Api/SplitDatabaseHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ struct SplitDatabaseHelper {
/// This avoids issues in concurrent initialization of SDK instances using the same SDK key + prefix,
/// while still allowing different dbKeys to initialize in parallel.
static private let storageLockMapGuard = NSLock()

#if swift(>=6.0)
nonisolated(unsafe) static private var storageLockMap: [String: NSLock] = [:]
#else
static private var storageLockMap: [String: NSLock] = [:]
#endif

static private func storageLock(for dbKey: String) -> NSLock {
storageLockMapGuard.lock()
Expand Down
Loading