2
0

Fix deadlock when loadStore posts notifications to the main thread.

This commit is contained in:
Maarten Billemont 2021-11-01 20:07:13 -04:00
parent 88a4d7ba4d
commit 0b45dc584f

View File

@ -132,8 +132,10 @@ MP_LIBS_END
[self updateConfigKey:note.object]; [self updateConfigKey:note.object];
} ); } );
PearlAddNotificationObserver( NSUserDefaultsDidChangeNotification, nil, nil, ^(id self, NSNotification *note) { PearlAddNotificationObserver( NSUserDefaultsDidChangeNotification, nil, nil, ^(id self, NSNotification *note) {
PearlMainQueueOperation( ^{
[[NSNotificationCenter defaultCenter] postNotificationName:MPCheckConfigNotification object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:MPCheckConfigNotification object:nil];
} ); } );
} );
} }
@catch (id exception) { @catch (id exception) {
err( @"During Config Test: %@", exception ); err( @"During Config Test: %@", exception );