# MacOS Audio Thread Workgroups

**URL:** <https://forum.juce.com/t/macos-audio-thread-workgroups/53857>\
**Category:** General JUCE discussion\
**Created:** [November 22, 2022, 11:05pm UTC](https://forum.juce.com/t/macos-audio-thread-workgroups/53857 "2022-11-22T23:05:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![wavesequencer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/wavesequencer/32/11659_2.png) [@wavesequencer](https://forum.juce.com/u/wavesequencer)\
**Post date:** [November 23, 2022, 7:45am UTC](https://forum.juce.com/t/macos-audio-thread-workgroups/53857/2 "2022-11-23T07:45:12Z")

</div>

Just FYI - unfortunately I don’t know the answer -

See also: [https://forum.juce.com/t/mac-m1-thread-priority-audio-workgroups/52188](https://forum.juce.com/t/mac-m1-thread-priority-audio-workgroups/52188)

and [https://forum.juce.com/t/fr-thread-priority-vs-efficiency-performance-cores/49025](https://forum.juce.com/t/fr-thread-priority-vs-efficiency-performance-cores/49025)

There is a description on how to retrieve the workgroup here:  
[https://developer.apple.com/documentation/audiotoolbox/workgroup\_management/adding\_parallel\_real-time\_threads\_to\_audio\_workgroups](https://developer.apple.com/documentation/audiotoolbox/workgroup_management/adding_parallel_real-time_threads_to_audio_workgroups)

It mentions retrieving directly from the HAL API - I’m not sure if that’s what the code example is doing with 'workgroup = auHal.osWorkgroup; - I’m just not familiar with any of that code or Objective C.

I’m really hoping the support for audio workgroups just gets integrated into JUCE Thread as a generic option when creating a thread (e.g. some kind of ‘try to join/associate to the ‘AudioProcessor’ audio callback workgroup’ flag/option) - or whatever is the better way to do that.  
It’s not just standalone hosting apps that can need multi-threaded real-time audio processing quite a few more powerful synths with multiple layers and large polyphony counts can greatly benefit from it - both as plugins or standalone builds.

Fingers crossed from my side that JUCE devs can take it on soon, because I’m also not keen on figuring out the Objective C side of it and how to integrate it with JUCE Thread, and I’m getting customer complaints about load spiking/audio glitching on M silicon systems - especially those with only 2 e-cores (where it seems some audio threads got demoted to e-cores). I also know of one other developer who maintains a popular plugin hosting app based off JUCE that is getting the same issues.

Cheers,  
Paul.

---

_[View the full topic](https://forum.juce.com/t/macos-audio-thread-workgroups/53857)._
