1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
JUCE/modules/juce_opengl
reuk 48c6087faf Thread: Update macOS thread priority calculation
The Apple threading documentation [^1] says the following:

> The second argument to pthread_setschedparam is the desired policy,
  which can currently be one of SCHED_FIFO (first in, first out),
  SCHED_RR (round-robin), or SCHED_OTHER. The SCHED_OTHER policy is
  generally used for extra policies that are specific to a given
  operating system, and should thus be avoided when writing portable
  code.

This appears to differ from the policy semantics on Linux and BSD, where
FIFO and RR are both explicitly real-time policies.

Therefore, on Linux/BSD we only enable the RR policy if the requested
priority is 8 or higher. Meanwhile, on macOS, we map all thread
priorities (0 - 10) onto the RR policy with an appropriate priority.

[^1]: https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/scheduler/scheduler.html
2021-12-14 22:50:09 +00:00
..
geometry Updated all license headers 2020-06-29 08:30:22 +01:00
native Windows: Use compatibility profile when creating 3.2 context to allow deprecated function use 2021-12-06 14:27:01 +00:00
opengl Thread: Update macOS thread priority calculation 2021-12-14 22:50:09 +00:00
utils Updated all license headers 2020-06-29 08:30:22 +01:00
juce_opengl.cpp Windows: Recreate OpenGL context if pixel format changes 2021-12-03 12:26:13 +00:00
juce_opengl.h Bump version number to 6.1.3 2021-12-08 15:26:08 +00:00
juce_opengl.mm Updated all license headers 2020-06-29 08:30:22 +01:00