Hi, I am currently implementing run-time merging of datasets created using VPB. When I add a new dataset I walk through an existing PagedLOD structure and add the appropriate Layers to the existing terrain tiles. During this process I may also update/add children and or settings of an existing PagedLOD. The same class that manages this process is also responsible for loading subtiles in response to a database request.
The problem I am having at the moment is that it is possible for my update thread (the frame loop is paused for the update) to be in the middle of merging in a new data set when a request comes in to load subtiles. This is causing some headaches as it is possible for me to miss updating subtiles that have been created due the request, but not yet added as a child to my PagedLOD. I am also iterating through a vector in one of the threads and updating it in the other which is obviously bad news. I could implement some sort of locking mechanism to solve the problem but I think it would be much cleaner to, before starting the update, pause the DatabasePager, clear any outstanding requests and wait for any requests that are currently being processed to complete. I could then safely updated the PagedLOD structure, then restart the pager. There is a setDatabasePagerThreadPause method but from my understaning of the code this returns immiadiatley. What I need to do is wait for the the pause to be completed before I continue. Is this functionality already available? I cant see how to achieve what I want but the pager is a not a simple class to understand so I may be missing something. Cheers, Brad DISCLAIMER:--------------------------------------------------------------------------- This e-mail transmission and any documents, files and previous e-mail messages attached to it are private and confidential. They may contain proprietary or copyright material or information that is subject to legal professional privilege. They are for the use of the intended recipient only. Any unauthorised viewing, use, disclosure, copying, alteration, storage or distribution of, or reliance on, this message is strictly prohibited. No part may be reproduced, adapted or transmitted without the written permission of the owner. If you have received this transmission in error, or are not an authorised recipient, please immediately notify the sender by return email, delete this message and all copies from your e-mail system, and destroy any printed copies. Receipt by anyone other than the intended recipient should not be deemed a waiver of any privilege or protection. Thales Australia does not warrant or represent that this e-mail or any documents, files and previous e-mail messages attached are error or virus free. -------------------------------------------------------------------------------------- _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

