Use Task.sleep instead of a weird thing.

This commit is contained in:
Brent Simmons 2024-06-12 22:46:33 -07:00
parent f8f67b1912
commit 5a02ba417f

View File

@ -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 () -> ()) {