summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-04-28 18:23:32 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-05-04 17:33:05 +0200
commit27d8e82e1ce7c6210a33f100cfb4f157ea9583d2 (patch)
treee97de81f16743ac7e527f796adc416cdc91e911c /platform/darwin
parent7390062c4589877dfc51e0b6f84e2fd5446b7a96 (diff)
downloadqtlocation-mapboxgl-27d8e82e1ce7c6210a33f100cfb4f157ea9583d2.tar.gz
lower thread priority of worker threads
Diffstat (limited to 'platform/darwin')
-rw-r--r--platform/darwin/nsthread.mm13
1 files changed, 13 insertions, 0 deletions
diff --git a/platform/darwin/nsthread.mm b/platform/darwin/nsthread.mm
new file mode 100644
index 0000000000..9ac1d2caa0
--- /dev/null
+++ b/platform/darwin/nsthread.mm
@@ -0,0 +1,13 @@
+#import <Foundation/Foundation.h>
+
+#include <mbgl/platform/platform.hpp>
+
+namespace mbgl {
+namespace platform {
+
+void makeThreadLowPriority() {
+ [[NSThread currentThread] setThreadPriority:0.0];
+}
+
+}
+}