Skip to content

Commit a03251e

Browse files
committed
Update ImageDecoderTests
1 parent 4e0bca9 commit a03251e

File tree

2 files changed

+146
-141
lines changed

2 files changed

+146
-141
lines changed

Sources/Nuke/Caching/Cache.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ final class Cache<Key: Hashable, Value>: @unchecked Sendable {
5656
self.memoryPressure.resume()
5757

5858
#if os(iOS) || os(tvOS) || os(visionOS)
59-
Task {
60-
await registerForEnterBackground()
59+
Task { @MainActor in
60+
registerForEnterBackground()
6161
}
6262
#endif
6363
}
@@ -70,7 +70,7 @@ final class Cache<Key: Hashable, Value>: @unchecked Sendable {
7070
}
7171

7272
#if os(iOS) || os(tvOS) || os(visionOS)
73-
@MainActor private func registerForEnterBackground() {
73+
private func registerForEnterBackground() {
7474
notificationObserver = NotificationCenter.default.addObserver(forName: UIApplication.didEnterBackgroundNotification, object: nil, queue: nil) { [weak self] _ in
7575
self?.clearCacheOnEnterBackground()
7676
}

0 commit comments

Comments
 (0)