multithreading issues and the scene graph

New Message Reply Date view Thread view Subject view Author view

Anthony Bavuso (a.t.bavuso++at++larc.nasa.gov)
Tue, 2 Nov 1999 13:36:26 -0500


I have a questions regarding multithreading, mutual exclusion, and the scene
graph.

I am designing a prototype flight simulator. I have created a class to
represent visible dynamic models (models that move) in the simulation that
run in their own thread of execution (using pthreads). This class called
DynamicModel has a pointer to a pfDCS and a child pfNode for the geometry
which are both children of the root scene graph node.

The DynamicModel model objects updates the pfDCS node to alter model
position in its own thread and hence asynchronously to performer traversing
the scene graph.

There are obvious problems that this could cause. For example the
DynamicModel may be writing to the pfDCS node while performer is trying to
read it. Problems solved by using some kind of semaphore, mutex, lock, etc.

My question is, Does performer have built-in to the pfDCS class and-or its
parent class, come kind of locking mechanism to prevent these problems? Can
you point me to where I could find documentation on this issue?

Also if the locking capability is not built in, would it be a good idea to
derive a new class from pfDCS that incorporates this functionality? Has
anyone done this successfully?

Thanks.


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Tue Nov 02 1999 - 10:30:09 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.