<p dir="ltr"><br>
Hi Robert,</p>
<p dir="ltr">> Have you tried setting the affinity of the threads that are created? <br>
> Have you tried creating the threads before the call to viewer.realize()? </p>
<p dir="ltr">Yes, both cause the threads being distributed across the cores. That is probably also why initialising TBB early in main helps, as it creates a pool of worker threads. For my app, you can consider it solved. <br>
But don't you see a difficulty for OSG, if you cannot use any threading library without additonal setup code?<br></p>
<p dir="ltr">> The way things are behaving looks to be down to the way that the Linux threading is forcing the inheritance of the threading affinity of the main thread to child threads.<br>
> I don't know if there is an setting on the Linux threads side that can change this behaviour so it's more consistent with other platforms. </p>
<p dir="ltr">I was looking for that, and my search was fruitless.<br>
It also seems not to be Linux specific. FreeBSD seems to do the the same, as is Windows: <a href="https://msdn.microsoft.com/es-es/library/windows/desktop/ms686223(v=vs.85).aspx">https://msdn.microsoft.com/es-es/library/windows/desktop/ms686223(v=vs.85).aspx</a><br>
> Process affinity is inherited by any child process or newly instantiated local process</p>
<p dir="ltr">It looks more like OS X is the isolated case (and qnx). </p>
<p dir="ltr">Cheers, </p>
<p dir="ltr">Fabian</p>