This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [win32] notifyAll also notifying following wait calls
- From: Tom Tromey <tromey at redhat dot com>
- To: Marco Trudel <mtrudel at gmx dot ch>
- Cc: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 05 Feb 2007 12:30:07 -0700
- Subject: Re: [win32] notifyAll also notifying following wait calls
- References: <45C60213.4000301@gmx.ch>
- Reply-to: tromey at redhat dot com
>>>>> "Marco" == Marco Trudel <mtrudel@gmx.ch> writes:
Marco> win32-threads.cc has a thread race for notifyAll() and
Marco> wait(). Test.java should actually deadlock, but sometimes it
Marco> doesn't because the second wait increments blocked_count before
Marco> the event is reset and thus will also be called.
I can't really comment on your patch, since I don't know much about
Windows.
But note that Object.wait() can wake up spuriously. So...
Marco> mainLock.wait(); // not allowed to be notified
... I think this comment is incorrect.
Tom