|
|
|
@ -4,16 +4,14 @@
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
typedef void (^SimpleBlock)(void);
|
|
|
|
|
|
|
|
|
|
// The block is executed immediately if called from the
|
|
|
|
|
// main thread; otherwise it is dispatched async to the
|
|
|
|
|
// main thread.
|
|
|
|
|
void DispatchMainThreadSafe(SimpleBlock block);
|
|
|
|
|
void DispatchMainThreadSafe(dispatch_block_t block);
|
|
|
|
|
|
|
|
|
|
// The block is executed immediately if called from the
|
|
|
|
|
// main thread; otherwise it is dispatched sync to the
|
|
|
|
|
// main thread.
|
|
|
|
|
void DispatchSyncMainThreadSafe(SimpleBlock block);
|
|
|
|
|
void DispatchSyncMainThreadSafe(dispatch_block_t block);
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|
|
|
|
|