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

Christoph Weiss weiss at wsoptics.de
Mon Sep 26 03:01:42 PDT 2016

Dear Robert,

On 09/26/2016 09:39 AM, Robert Osfield wrote:
> The only "difficulty" is when using a certain usage model when
> threading, it's not a general issue.  The issue looks to be isolated
> to the case where users set up threads after the viewer has been
> realized.

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.

> 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?


More information about the osg-users mailing list