I am using a InterProcessConnection to synchronise 20 plugins with a master plugin (InterProcessConnectionServer). The only thing the plugin does is attenuate the gain.
I just realise, that the IPC threads are spinning free burning CPU.
The readNextMessageInt() method is supposed to block, but it doesn’t:
What I did was, to add breakpoints inside if (bytesInMessage > 0) and if (bytesInMessage < 0) => not hit, but if I put a breakpoint inside the thread loop, it is hit straight away.
Hi @t0m, thanks for looking into it.
In my normal use case with 34 instances, I tried first adding 5ms timeout, which reduced the overall load from 140% to 95-105%, so first not impressed…
Then I tried with 20ms, and it went down to 35-40%.
So yes, this is the point, where it burns CPU, but it seems, it’s not really usable for realtime?
I am not completely sure, does adding 20 ms timeout mean, that I wait eventually up to 20 ms for my packet, or is that a blocking wait, that would continue, as soon there is activity on the socket?
I’ll try to use a pipe now, maybe that get’s somewhere…