This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
Re: Patch: Thread_1 fixlet
- To: tromey at redhat dot com, java-patches at sources dot redhat dot com
- Subject: Re: Patch: Thread_1 fixlet
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Sat, 16 Dec 2000 20:52:43 +1300
- References: <87itokn9da.fsf@creche.redhat.com>
Tom Tromey wrote:
> This fixes a bug in the test suite. We were expecting the wrong
> result.
>
> 2000-12-15 Tom Tromey <tromey@redhat.com>
>
> * libjava.lang/Thread_1.out: Expect `0' active count.
Hmm... Thread_1 has a race condition. The second thread can end up
calling notify() before the first thread calls wait(). This patch should
fix it, but we could probibly just delete that test. I think everything
it does is covered by the various other Thread_* tests.
[ bryce ]
Index: Thread_1.java
===================================================================
RCS file: /cvs/gcc/egcs/libjava/testsuite/libjava.lang/Thread_1.java,v
retrieving revision 1.2
diff -u -r1.2 Thread_1.java
--- Thread_1.java 1999/07/02 15:44:10 1.2
+++ Thread_1.java 2000/12/16 07:41:27
@@ -137,6 +137,7 @@
try
{
nt.start();
+ Thread.sleep(20);
dt.start();
// Don't wait for the threads if we're doing the exit test.