From 943937debdd3b731322aab05fbce4405d455edb3 Mon Sep 17 00:00:00 2001 From: Fredrik Karlsson Date: Tue, 30 Jul 2019 21:49:51 +0300 Subject: temp thread workaround --- platform/default/src/mbgl/util/thread.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/default/src/mbgl/util/thread.cpp b/platform/default/src/mbgl/util/thread.cpp index 28772d9561..48950d48fc 100644 --- a/platform/default/src/mbgl/util/thread.cpp +++ b/platform/default/src/mbgl/util/thread.cpp @@ -18,20 +18,26 @@ std::string getCurrentThreadName() { } void setCurrentThreadName(const std::string& name) { +#ifdef __APPLE__ +#else if (name.size() > 15) { // Linux hard limit (see manpages). pthread_setname_np(pthread_self(), name.substr(0, 15).c_str()); } else { pthread_setname_np(pthread_self(), name.c_str()); } +#endif } void makeThreadLowPriority() { struct sched_param param; param.sched_priority = 0; +#ifdef __APPLE__ +#else if (sched_setscheduler(0, SCHED_IDLE, ¶m) != 0) { Log::Warning(Event::General, "Couldn't set thread scheduling policy"); } +#endif } void attachThread() { -- cgit v1.2.1