I saw the WWDC video about Metal Game Performance and set the phtread priority to 45 as it was shown in the session. My thread routine creates a MTLCommandBuffer und encodes compute and render commands into it. There is not much other CPU work beside filling the MTLCommandBuffer.
By using instruments I can observe two interrupts in each renderloop ("Interrupted for # while CPU # serviced an interrupt handler").
First I thought these two interrupts could be because I had two callback handlers for the command buffer in my code. But this was not the cause for the thread interruptions.
@cwoolf As you said the interrupts have less impact to the app performance (a few mikroseconds/nanoseconds). But is there an way to find out what the reasons for these interrupts are? For my application I would say the reason can be in the Metal commands I have in my code. Even there are no buffer callbacks maybe there are internally some syncronization task between the CPU and GPU that cause the interrupts. I will examine this further. But what I cannot understand why the interrupts are not at the same time position even the command buffers render/compute the same content. Is it possible to run threads running metal code without any interrupts?