mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-27 09:21:21 +01:00
Prevent deadlocks by notifying group completion on background thread
This commit is contained in:
parent
d1c3d43018
commit
f193b6da1a
@ -456,11 +456,15 @@ extension CloudKitZone {
|
||||
}
|
||||
}
|
||||
|
||||
group.notify(queue: DispatchQueue.main) {
|
||||
group.notify(queue: DispatchQueue.global(qos: .background)) {
|
||||
if errorOccurred {
|
||||
completion(.failure(CloudKitZoneError.unknown))
|
||||
DispatchQueue.main.async {
|
||||
completion(.failure(CloudKitZoneError.unknown))
|
||||
}
|
||||
} else {
|
||||
completion(.success(()))
|
||||
DispatchQueue.main.async {
|
||||
completion(.success(()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user