<div dir="ltr">Hi James,<div>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)</div><div>so there will not be a threading problem if you check the number of children from the main thread.</div><div>Regards, Laurens. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 5, 2017 at 2:37 PM, James Turner <span dir="ltr"><<a href="mailto:zakalawe@mac.com" target="_blank">zakalawe@mac.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
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)<br>
<br>
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?<br>
<br>
(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)<br>
<br>
Kind regards,<br>
James<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</blockquote></div><br></div>