1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00
JUCE/modules/juce_core
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
..
containers Tidy up 2021-12-02 09:24:55 +00:00
files Tidy up 2021-12-02 09:24:55 +00:00
javascript CharacterFunctions: Add new function to move pointer past whitespace 2021-02-18 10:54:29 +00:00
logging macOS: Be explicit about string encodings when logging assertions 2021-02-18 17:16:45 +00:00
maths Tidy up 2021-12-02 09:24:55 +00:00
memory Reservoir: Fix bug where incorrect buffer region could be read in some cases 2021-10-14 12:40:46 +01:00
misc Docs fix 2021-12-07 17:30:54 +00:00
native Thread: Update macOS thread priority calculation 2021-12-14 22:50:09 +00:00
network CharacterFunctions: Avoid UB when parsing hex strings 2021-10-25 09:51:20 +01:00
streams Update code to use C++14 [[deprecated]] attribute 2021-09-29 16:14:00 +01:00
system Bump version number to 6.1.3 2021-12-08 15:26:08 +00:00
text Tidy up 2021-12-02 09:24:55 +00:00
threads Update code to use C++14 [[deprecated]] attribute 2021-09-29 16:14:00 +01:00
time Time: Fix duplicate '-' symbols in UTC offset string 2021-11-24 16:20:37 +00:00
unit_tests Added startTime and endTime to UnitTest TestResult struct 2020-06-17 15:54:28 +01:00
xml Update code to use C++14 [[deprecated]] attribute 2021-09-29 16:14:00 +01:00
zip Update code to use C++14 [[deprecated]] attribute 2021-09-29 16:14:00 +01:00
juce_core.cpp Added preliminary support for FreeBSD 2021-03-29 14:16:46 +01:00
juce_core.h Bump version number to 6.1.3 2021-12-08 15:26:08 +00:00
juce_core.mm Updated all license headers 2020-04-23 17:30:39 +01:00