Hi James, the PagedLOD addChild call is made from the main thread ( in DatabasePager::addLoadedDataToSceneGraph called from DatabasePager::updateSceneGraph called from Scene::updateSceneGraph called from Viewer::updateTraversal) so there will not be a threading problem if you check the number of children from the main thread. Regards, Laurens.
On Tue, Sep 5, 2017 at 2:37 PM, James Turner <[email protected]> wrote: > Hi, > > I’ve done some searching of the OSG examples but didn’t discover a > solution yet: how do I safely (given threading) query from the main thread, > if a PagedLOD has loaded it’s content. (Assuming only a single level of > detail) > > I think I can possibly query the number of children being 0 or 1, but that > feels potentially a bit hacky? And again I worry about thread-safety; does > the DatabasePager do some locking to regulate when loaded content is > inserted into the PagedLOD? > > (Note I have many concurrent PagedLODs and I need to know if a particular > one is finished, I can’t use a global query on the DatabasePager being > idle, which some OSG examples do) > > Kind regards, > James > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

