[Audio Threads] Clear workgroup token on exit

When leaving the workgroup, clear the token, as the join call requires
the token to be uninitialized.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-10 16:42:33 -07:00
parent 22a41e71d3
commit ef2ba385f2
1 changed files with 1 additions and 0 deletions

View File

@ -243,6 +243,7 @@ BOOL SetPriorityRealtimeAudio(mach_port_t mach_thread_id) {
if(@available(macOS 11, *)) {
if(wg && !isRealtimeError) {
os_workgroup_leave(wg, &wgToken);
bzero(&wgToken, sizeof(wgToken));
wg = nil;
}
}