[osg-users] SingleThreaded leading to whole application just running on one core

Robert Osfield robert.osfield at gmail.com
Mon Sep 26 03:20:43 PDT 2016

Hi Christoph,

On 26 September 2016 at 11:01, Christoph Weiss <weiss at wsoptics.de> wrote:
> This sounds a bit as if this was a rare thing to do, or at least a design
> choice that can or should be avoided.  I think on the contrary, explicit
> thread handling is something that is slowly going to die for many
> applications, the future lies in futures (pun pun) and parallel version of
> standard algorithms.  C++17 adds a lot of parallel functionality that the
> user can use without caring about threads themselves.  The code sample that
> I posted yesterday is a typical std::future application.

I think you need to trust me on the scene graph performance front.
Thread affinity is important for performance.  Future threaded support
in languages makes no difference to the cost of threads moving from
core to core.  It's the same problem no matter what API you wrap it up

>> If there was an easy and intuitive route to user control of thread
>> affinity it would have been implemented already.
> What would be wrong with an osg::setThreadAffinity(...) function a user who
> knows what they're doing can use?

The OSG users don't always know what threads are active, let alone
what ones they need to set to get best performance.  The OSG in it's
defaults try to do the best it can for users.  It's not perfect, but
it at least tries.


More information about the osg-users mailing list