User threads synchronization

16 views
Skip to first unread message

jesusdz

unread,
Feb 20, 2015, 12:31:12 PM2/20/15
to vrjuggler...@googlegroups.com
Hi Everybody,

Which would be the more convenient way to synchronize user defined threads?

To put in context, I amb running VRJuggler in a clustered system with several machines. At some point, all machines need to perform some costly computations (e.g. load some big models from disk), and for that they create and start a new thread in preFrame(). The threads are now running concurrently doing their task while the application keeps running and rendering without blocking. Then, after some time all threads will eventually finish, and that won't necessarily happen in the same frame. I would like though joining all threads at the same moment to avoid undeterministic behaviours.

Is there an easy way to do that already???

Thanks in advance!

Patrick Fewell-Hartling

unread,
Feb 25, 2015, 3:20:44 PM2/25/15
to vrjuggler...@googlegroups.com
If you want something that’s based on the threads on each machine, there is vpr::Thread::join(). If you want to do synchronization among the cluster nodes, it’s a little more tricky. There is a type called cluster::UserData<T> that offers a way to define application-specific shared data. If I remember right, that can be used as a cluster-wide synchronization point.

 -Patrick

Reply all
Reply to author
Forward
0 new messages