You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Roger Critchlow <re...@elf.org> on 2006/04/25 06:36:12 UTC
Synchonize to UpdateManagerThread?
Good evening all,
What's the best way to synchronize to the UpdateManagerThread?
I have an animation which computes new coordinates for a document and
then calls runInUpdateThread() to modify the document. It really
ought to wait for the UpdateThread to finish before starting the next
frame.
It looks like getUpdateManager().resume() might be a good choice, but
there isn't much guidance in the source code.
-- rec --
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Synchronize to UpdateManagerThread?
Posted by th...@kodak.com.
Hi Roger,
rogercritchlow@gmail.com wrote on 04/25/2006 12:36:12 AM:
> What's the best way to synchronize to the UpdateManagerThread?
Well, that would be 'invokeLater' or 'invokeAndWait'.
> I have an animation which computes new coordinates for a document and
> then calls runInUpdateThread() to modify the document. It really
> ought to wait for the UpdateThread to finish before starting the next
> frame.
If you really want to wait until your animation will be executing
before calculating coordinates then you should simply move the calculation
into the Runnable that modifies the document.
> It looks like getUpdateManager().resume() might be a good choice, but
> there isn't much guidance in the source code.
This wouldn't be a good choice ;)
The UpdateManager/RunnableQueue does have a primitive 'event'
notification system. But honestly I would throw my runnable on the
queue and when it runs than I know that I should calculate my next
frame...
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org