Hi Robert

How one should change the number of threads dynamic before DatabasePager 
initialise it in his singleton? 


Code:
    
int cores = Registry::capabilities().getNumProcessors();
osg::DisplaySettings::instance()->setNumOfDatabaseThreadsHint( 
osg::clampAbove(cores, 2) );
osg::DisplaySettings::instance()->setNumOfHttpDatabaseThreadsHint( 
osg::clampAbove(cores/2, 1) );




It will not work. It works only with an environment variable. The singleton 
should not setup the threads on startup. The constructor of a singleton is at 
beginning of application startup. The order of initialise is not defined (only 
from the compiler).

Cheers,
Remo

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70866#70866





_______________________________________________
osg-submissions mailing list
osg-submissions@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to