Serialize persistent store update to main thread
This needs to be called on the main thread, as something may or may not be enumerating over the data while this thread decides to call it. Signed-off-by: Christopher Snowhill <kode54@gmail.com>swiftingly
parent
903bc9cba5
commit
62824a94bd
|
@ -751,7 +751,9 @@ NSURL *_Nullable urlForPath(NSString *_Nullable path);
|
|||
});
|
||||
}
|
||||
|
||||
[playlistController commitPersistentStore];
|
||||
dispatch_sync_reentrant(dispatch_get_main_queue(), ^{
|
||||
[self->playlistController commitPersistentStore];
|
||||
});
|
||||
|
||||
[playlistController performSelectorOnMainThread:@selector(updateTotalTime) withObject:nil waitUntilDone:NO];
|
||||
|
||||
|
|
Loading…
Reference in New Issue