mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-03 12:27:32 +01:00
Move MainThreadOperation and MainThreadOperationQueue to CloudKitSync, which is the last place where it’s used.
This commit is contained in:
parent
01f08b9f27
commit
ec12232fb8
@ -71,9 +71,6 @@ final class FeedlyAccountDelegate: AccountDelegate {
|
|||||||
private let log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "Feedly")
|
private let log = OSLog(subsystem: Bundle.main.bundleIdentifier!, category: "Feedly")
|
||||||
private let syncDatabase: SyncDatabase
|
private let syncDatabase: SyncDatabase
|
||||||
|
|
||||||
private weak var currentSyncAllOperation: MainThreadOperation?
|
|
||||||
private let operationQueue = MainThreadOperationQueue()
|
|
||||||
|
|
||||||
init(dataFolder: String, transport: Transport?, api: FeedlyAPICaller.API, secretsProvider: SecretsProvider) {
|
init(dataFolder: String, transport: Transport?, api: FeedlyAPICaller.API, secretsProvider: SecretsProvider) {
|
||||||
// Many operations have their own operation queues, such as the sync all operation.
|
// Many operations have their own operation queues, such as the sync all operation.
|
||||||
// Making this a serial queue at this higher level of abstraction means we can ensure,
|
// Making this a serial queue at this higher level of abstraction means we can ensure,
|
||||||
@ -933,7 +930,8 @@ final class FeedlyAccountDelegate: AccountDelegate {
|
|||||||
func suspendNetwork() {
|
func suspendNetwork() {
|
||||||
MainActor.assumeIsolated {
|
MainActor.assumeIsolated {
|
||||||
caller.suspend()
|
caller.suspend()
|
||||||
operationQueue.cancelAllOperations()
|
// TODO: cancel tasks
|
||||||
|
// operationQueue.cancelAllOperations()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user