This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Deadlock in 'initializeClass'
- To: Matt Welsh <mdw@cs.berkeley.edu>
- Subject: Re: Deadlock in 'initializeClass'
- From: Tom Tromey <tromey@cygnus.com>
- Date: Wed, 1 Sep 1999 15:57:41 -0700
- Cc: java-discuss@sourceware.cygnus.com
- References: <199909012242.PAA23257@bhikku.CS.Berkeley.EDU>
>>>>> "Matt" == Matt Welsh <mdw@cs.berkeley.edu> writes:
Matt> While another thread does the 'notify()' that the class has been
Matt> initialized, for some reason the other threads never wake up.
Matt> Any ideas?
Funnily enough, I noticed this morning that there were bugs in this
area.
Two possibilities for the bug:
1. In some places I noticed that the "state" field was set but no
notify() was done.
2. Some places call notify() after updating state and some call
notifyAll(). I suspect we want to use notifyAll() everywhere, but I
haven't really looked into it.
Tom