From e6aa16ad01db1b12d85131d492430c633a4387c3 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 13 Nov 2015 19:07:15 -0800 Subject: [PATCH] Revert "Fix concurrent modification crash in app asset caching code" This reverts commit ad0705d126261b32d64c76bac4f831f8600d3d4d. --- .../ViewControllers/MainFrameViewController.m | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index 21c4979..f741e9a 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -696,14 +696,14 @@ static NSMutableSet* hostList; _sortedAppList = [host.appList allObjects]; _sortedAppList = [_sortedAppList sortedArrayUsingSelector:@selector(compareName:)]; - // Dispatch independent jobs to fetch each app art asset. This way we enumerate on the main thread - // which is safe for accessing the app list, and this also provides us the ability to use the sorted - // list to fetch items the user is more likely to view first. - for (App* app in _sortedAppList) { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + // Start populating the box art cache asynchronously + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + Log(LOG_I, @"Starting per-computer box art caching job"); + for (App* app in host.appList) { [self updateBoxArtCacheForApp:app]; - }); - } + } + Log(LOG_I, @"Per-computer box art caching job completed"); + }); [hostScrollView removeFromSuperview]; [self.collectionView reloadData];