Hi Sudhakar,
Sudhakar S <[EMAIL PROTECTED]> wrote on 08/18/2006 11:40:37 AM:
> > The general solution to this problem is to introduce a third thread
> > that can safely call invokeAndWait and then run some code in the
> > Swing thread.
>
> With third thread i can able to use "invokeAndWait". But if i tried to
sync
> with main thread using "join", its again getting struck. So can you
please
> explain bit more. so that i can sync with main thread.
You have to let the swing thread return.
I don't know what you are trying to do so I can't suggest how to
do it. Why do you want to block the swing thread until the
Runnable in the update manager completes?
Do you know that you can call any function in the
Swing thread with SwingUtilities.invokeLater/invokeAndWait?
So you can call back to Swing when the Runnable completes
without having to wait in the Swing thread.
> Thread t1 = new Thread(new Runnable() {
> });
>
> t1.start();
> t1.join();
>
> > Well you can synch it in this case but it would be more work.
>
> Please give some more information to sync UpdateManager's thread with
main
> thread to perform other operations in synchronized manner.
>
> Thanks,
> Sudhakar
> --
> View this message in context:
http://www.nabble.com/Problem-in-invokeAndWait-
> tf2124331.html#a5872078
> Sent from the Batik - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]