aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFunctions.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPFunctions.m')
-rw-r--r--Source/SPFunctions.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/SPFunctions.m b/Source/SPFunctions.m
index 461304e0..ca3462c4 100644
--- a/Source/SPFunctions.m
+++ b/Source/SPFunctions.m
@@ -42,6 +42,12 @@ void SPMainQSync(void (^block)(void))
}
}
+void SPMainLoopAsync(void (^block)(void))
+{
+ NSArray *modes = @[NSDefaultRunLoopMode];
+ CFRunLoopPerformBlock(CFRunLoopGetMain(), modes, block);
+}
+
int SPBetterRandomBytes(uint8_t *buf, size_t count)
{
if([SPOSInfo isOSVersionAtLeastMajor:10 minor:7 patch:0]) {