On Thu, 23 May 2002 08:48, Andrei Ivanov wrote:
> when it is time do dispose I have the following lines inside dispose():
>
>     for (Iterator i = threads.iterator(); i.hasNext(); ) {
>       ThreadControl tc = (ThreadControl)i.next();
>       tc.interupt();
>     }
>     notifyAll();

Java does not allow you to do a notifyAll() unless you own the synchronization 
lock on specified component. So you should do

synchronized( this ) { notifyAll(); }

BTW I would recomend that you do a join() on ThreadControl to verify that 
threads have shutdown before block does.

-- 
Cheers,

Peter Donald


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to