File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ extern NSTimeInterval const PFEventuallyQueueDefaultTimeoutRetryInterval;
67
67
- (void )start NS_REQUIRES_SUPER;
68
68
- (void )resume NS_REQUIRES_SUPER;
69
69
- (void )pause NS_REQUIRES_SUPER;
70
-
70
+ - ( void ) stop NS_REQUIRES_SUPER;
71
71
- (void )removeAllCommands NS_REQUIRES_SUPER;
72
72
73
73
@end
Original file line number Diff line number Diff line change @@ -197,6 +197,10 @@ - (void)pause {
197
197
dispatch_suspend (_processingQueueSource);
198
198
}
199
199
200
+ - (void )stop {
201
+ dispatch_source_cancel (_processingQueueSource);
202
+ }
203
+
200
204
- (void )removeAllCommands {
201
205
dispatch_sync (_synchronizationQueue, ^{
202
206
[_taskCompletionSources removeAllObjects ];
Original file line number Diff line number Diff line change @@ -174,12 +174,15 @@ - (PFEventuallyQueue *)eventuallyQueue {
174
174
[PFPinningEventuallyQueue newDefaultPinningEventuallyQueueWithDataSource: self ]
175
175
:
176
176
commandCache);
177
-
178
177
// We still need to clear out the old command cache even if we're using Pinning in case
179
178
// anything is left over when the user upgraded. Checking number of pending and then
180
179
// clearing should be enough.
181
- if (self.offlineStoreLoaded && commandCache.commandCount > 0 ) {
182
- [commandCache removeAllCommands ];
180
+ if (self.offlineStoreLoaded ) {
181
+ if (commandCache.commandCount > 0 ) {
182
+ [commandCache removeAllCommands ];
183
+ }
184
+ // we won't need it after stop everything...
185
+ [commandCache stop ];
183
186
}
184
187
}
185
188
#endif
@@ -442,7 +445,6 @@ - (BFTask *)preloadDiskObjectsToMemoryAsync {
442
445
#endif
443
446
];
444
447
[[BFTask taskForCompletionOfAllTasks: tasks] waitUntilFinished ]; // Wait synchronously to make sure we are blocking preload queue.
445
- [self eventuallyQueue ];
446
448
447
449
return nil ;
448
450
}];
You can’t perform that action at this time.
0 commit comments