From af82399f3738899d11168c34e0ea001517ee9d70 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Mon, 4 Jul 2022 17:37:32 -0700 Subject: [PATCH] [Playlist Loader] Fix background queue post action Post action now returns the files. Signed-off-by: Christopher Snowhill --- Playlist/PlaylistLoader.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Playlist/PlaylistLoader.m b/Playlist/PlaylistLoader.m index cd47294f4..c70df1ba8 100644 --- a/Playlist/PlaylistLoader.m +++ b/Playlist/PlaylistLoader.m @@ -346,8 +346,9 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc __block NSArray *outurls = nil; + atomic_fetch_add(&self->loaderQueueRefCount, 1); + dispatch_async(loaderQueue, ^{ - atomic_fetch_add(&self->loaderQueueRefCount, 1); outurls = [self doInsertURLs:urls atIndex:index sort:sort]; atomic_fetch_sub(&self->loaderQueueRefCount, 1); });