Thomas,

Thank you for your help.  I created the following class to take the calls to update 
manager out of the Swing event thread:

public class LoaderThread extends Thread
{
        private Runnable io_runnable = null;
        private UpdateManager io_update_manager = null;
        
        public LoaderThread( Runnable _o_runnable, UpdateManager _o_manager )
        {
                io_runnable = _o_runnable;
                io_update_manager = _o_manager;
        }
        
        public void run()
        {
                try
                {
                        io_update_manager.getUpdateRunnableQueue().invokeAndWait( 
io_runnable );
                }
                catch (InterruptedException e)
                {
                        e.printStackTrace();
                }
        }
}

My program still hangs after the second call to UpdateManager.  The calls will work 
fine if I use invokeLater calls but I want to maintain some degree of synchronization. 
 In other words, the first call to UpdateManager must complete before I can make the 
second call.  Is there a way I can determine if UpdateManager has completed my first 
request before making the second request (assuming I am using invokeLater in both 
cases)?  

Any other suggestions?  Thanks!

-Mike

-----Original Message-----
From: Thomas DeWeese [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 5:56 PM
To: Batik Users
Subject: Re: invokeAndWait hang problem


Mike Favata wrote:
> Hello all,
> 
> I am having trouble with the invokeAndWait method offered by 
> UpdateManager.  I am able to call invokeAndWait successfully 
> in this block of code:

Hi Mike,

    I suspect that you are calling invokeAndWait from the
Swing event thread.  This is prone to causing deadlocks
as you have discovered.  You need to move the calls to
invokeAndWait to another thread.



---------------------------------------------------------------------
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]

Reply via email to