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>lastfm
parent
6867ef1e9a
commit
b2c354a32c
|
@ -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