From 5a02ba417f4bf3fcd0f37b00bbbae75778250e11 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Wed, 12 Jun 2024 22:46:33 -0700 Subject: [PATCH] Use Task.sleep instead of a weird thing. --- CloudKitSync/Sources/CloudKitSync/CloudKitZone.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CloudKitSync/Sources/CloudKitSync/CloudKitZone.swift b/CloudKitSync/Sources/CloudKitSync/CloudKitZone.swift index 6d6e109f6..fd616062a 100644 --- a/CloudKitSync/Sources/CloudKitSync/CloudKitZone.swift +++ b/CloudKitSync/Sources/CloudKitSync/CloudKitZone.swift @@ -114,11 +114,7 @@ public protocol CloudKitZone: AnyObject { func delay(for seconds: Double) async { - await withCheckedContinuation { continuation in - self.retryIfPossible(after: seconds) { - continuation.resume() - } - } + try? await Task.sleep(for: .seconds(1)) } nonisolated func retryIfPossible(after: Double, block: @escaping @Sendable @MainActor () -> ()) {