From e31b1573944cb5ef7ff417d61472f25ac7b40c4d Mon Sep 17 00:00:00 2001 From: Matej Bukovinski Date: Wed, 19 Dec 2012 16:24:00 +0100 Subject: [PATCH] Don't dispatch cancelAll calls. - should fix pre-fetcher problems #247 - cancelAll should be always called using the main thread --- SDWebImage/SDWebImageManager.m | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index 8c38c96d..c185b7ee 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -130,11 +130,8 @@ - (void)cancelAll { - dispatch_async(dispatch_get_main_queue(), ^ - { - [self.runningOperations makeObjectsPerformSelector:@selector(cancel)]; - [self.runningOperations removeAllObjects]; - }); + [self.runningOperations makeObjectsPerformSelector:@selector(cancel)]; + [self.runningOperations removeAllObjects]; } @end