[osg-users] Processor Affinity and forked processes
Jannik Heller
scrawl at baseoftrash.de
Sat Nov 28 17:48:10 PST 2015
Hi Robert,
> I merged what were supposed to be "fixes" to the OpenThreads from a user submissions between OSG-3.2 and 3.4. The change in behaviour might stem from this, try reverting these changes and see what happens.
>
the setting of thread affinity for the main thread in ViewerBase::setUpThreading https://github.com/openscenegraph/osg/blob/master/src/osgViewer/ViewerBase.cpp#L153 has been there since at least 2007. The recent change on osg-submissions simply enabled the thread affinity feature to work on Linux (as it was previously a no-op), but there is nothing wrong with the submission as such.
Curiously the affinity setting in ViewerBase::setUpThreading is only done when threadingMode is set to SingleThreaded, which is probably why the issue wasn't noticed sooner.
It's not advisable to set the cpu affinity for the main thread (especially not in a general purpose library), since the setting also affects threads spawned from client code.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65786#65786
More information about the osg-users
mailing list