You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Bill Haneman <bi...@ireland.sun.com> on 2000/11/09 22:14:52 UTC

Re:[commit] Thread stuff

Bill Haneman wrote:
I have noticed a few minor things that I should clean up as I
investigate
the Forward/Back actions.

Also, we probably should replace
javax.swing.SwingUtilities.invokeLater()
with
java.awt.EventQueue.invokeLater()

(though they are really the same thing).

Also note that in some cases we want to block until our event has
been "delivered" (i.e. run), in which case we can use
invokeAndWait().

-Bill 
--------------
Bill Haneman
+1 353 1 849 0495

Re: [commit] Thread stuff

Posted by Stephane Hillion <St...@sophia.inria.fr>.
Bill Haneman wrote:

> Also note that in some cases we want to block until our event has
> been "delivered" (i.e. run), in which case we can use
> invokeAndWait().

Such a case is in DocumentLoadRunnable.run():

            fireDocumentEvent(
                new DocumentLoadingEvent(
                        DocumentLoadingEvent.LOADED, doc));

            ...

            float w = elt.getWidth().getBaseVal().getValue();

This code produces sometimes a NullPointerException due to a race
condition:

    CSSLength.getValue() needs a fully initialized SVGContext, what is
done by the DocumentLoadRunnable listener.
--
    Stephane.