You can have as many threads doing stuff as you want, however, they must all
serialize their DOM updates through the UpdateManager's queue. The
UpdateManager has a single thread that actually performs the DOM updates.
Your threads are not allowed to manipulate the DOM directly (otherwise,
there would be a race condition).

Basically, everywhere you would want to do "manipulateDOM()" you instead
must do:

  canvas.getUpdateManager().getUpdateRunnableQueue().invokeLater(
    new Runnable() {
      public void run() { manipulateDOM(); }
    });

This is similar to the rule for programming in Swing, where updates must be
done in the Swing thread.

-Archie

On Tue, Aug 26, 2008 at 8:07 AM, John C. Turnbull <[EMAIL PROTECTED]>wrote:

>  In addition though, is it possible for some degree of multi-threading to
> happen within a single SVG?  That is, can two or more scripts or animations
> be executed simultaneously?  Say if one button starts an animation and then
> clicking another button starts a further animation before the first
> animation has completed etc.?  Or is it that once one animation or script
> starts then no other one can start concurrently?
>
>
-- 
Archie L. Cobbs

Reply via email to