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>
This commit is contained in:
parent
903bc9cba5
commit
62824a94bd
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue