Deadlock in 'initializeClass'
Tom Tromey
tromey@cygnus.com
Wed Sep 1 15:59:00 GMT 1999
>>>>> "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
More information about the Java
mailing list