RE: DisplayImpl Simplified: addReferences

Hi Randall,

> Are these the only threads that access the DisplayImpl objects?  How many
> are there for each Display?  Is there somewhere I should look in the
> documentation or code to learn more about the thread structure of VisAD?

mapslock protects almost all of the doAction() method,
where Data objects are transformed into scene graphs
under the DisplayImpl's own Thread. mapslock also
protects the methods by which any Thread can add or
remove DataReferences to a DisplayImpl. Thus it is needed.
The big performance gain you see in removing the use
of mapslock in addReferences() might also be acheivable
by enclosing the sequence of operations on your
DisplayImpl between calls to display.disableAction()
and display.enableAction(). Probably your first
addReferences() triggers a call to doAction(), which
locks out later addReferences() calls. The disableAction()
will prevent the doAction() call until the enableAction().

Good luck,
Bill


  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: