Browse Source

Fix Linux thread priority

Signed-off-by: falkTX <falktx@falktx.com>
v6.0.8-distrho
falkTX 2 years ago
parent
commit
ea06d6100e
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      modules/juce_core/native/juce_posix_SharedCode.h

+ 4
- 0
modules/juce_core/native/juce_posix_SharedCode.h View File

@@ -989,7 +989,11 @@ bool Thread::setThreadPriority (void* handle, int priority)
if (pthread_getschedparam ((pthread_t) handle, &policy, &param) != 0)
return false;
#if JUCE_LINUX
policy = priority < 9 ? SCHED_OTHER : SCHED_RR;
#else
policy = priority == 0 ? SCHED_OTHER : SCHED_RR;
#endif
const int minPriority = sched_get_priority_min (policy);
const int maxPriority = sched_get_priority_max (policy);


Loading…
Cancel
Save