mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 16:26:04 +00:00
Switch from OSAllocatedUnfairLock to Mutex.
This commit is contained in:
1 parent
a207f3411e
commit
3dfe0595f6
4 files changed
+9
-8
No files matched your search
@@ -11,6 +11,7 @@ import os
|
||||
import RSCore
|
||||
import RSParser
|
||||
import RSWeb
|
||||
import Synchronization
|
||||
import ActivityLog
|
||||
|
||||
nonisolated public final class HTMLMetadataDownloader: Sendable {
|
||||
@@ -21,10 +22,10 @@ nonisolated public final class HTMLMetadataDownloader: Sendable {
|
||||
|
||||
private static let hoursBetweenAttempts = 3
|
||||
|
||||
private let attemptDates = OSAllocatedUnfairLock(initialState: [String: Date]())
|
||||
private let attemptDates = Mutex([String: Date]())
|
||||
|
||||
/// In-memory mirror so `cachedMetadata(for:)` can answer synchronously.
|
||||
private let cache = OSAllocatedUnfairLock(initialState: [String: HTMLMetadataRecord]())
|
||||
private let cache = Mutex([String: HTMLMetadataRecord]())
|
||||
|
||||
init() {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(handleAppDidGoToBackground(_:)), name: .appDidGoToBackground, object: nil)
|
||||
|
||||
Reference in new issue
Block a user