Hi Bart, OpenThreads doesn't have support for a an external thread suspending another. The only way you could implement such a feature would be to do it co-operatively i.e. have a check for the need for a barrier in the threads. You'd only ever get the threads to pause at this synchronization points, but it would at least give you something close to the behavior you are after.
Robert. On 13 December 2011 16:22, bart gallet <[email protected]> wrote: > Howdy all, > > Is there an easy and graceful way to temporarily suspend a selected number of > threads, and then resume them some later time? > > I have a have a couple of vehicle simulations running in separate threads > that drive various 3D vehicle objects (position and attitude) in the scene > graph, and these simulations run at a much higher rate than the rate at which > I call viewer::frame(). > > Because I am doing a number of off-screen post renders followed by the main > viewer's rendering, and its very important that all drawing is performed at > the same instant in simulated time, hence I would like to suspend all my > simulation threads just before I call viewer::frame(), and then resume them > as soon as I return. > > I guess what I need is the opposite of a condition. > > Can I use OpenThreads::Block for this? > > (All my threading objects are derived from OpenThreads::Thread) > > Thank you! > > Cheers, > bart > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=44362#44362 > > > > > > _______________________________________________ > 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

