[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] RFC: VMThread.sleep mauve fix
From: |
Mark Wielaard |
Subject: |
Re: [cp-patches] RFC: VMThread.sleep mauve fix |
Date: |
Tue, 01 Nov 2005 18:31:20 +0100 |
Hi Christian,
On Tue, 2005-10-25 at 01:10 +0200, Christian Thalinger wrote:
> Just noticed that the default implementation in GNU classpath has
> problems with gnu.testlet.java.lang.Thread.sleep. This patch should fix
> the issue, without breaking anything.
>
> 2005-10-25 Christian Thalinger <address@hidden>
>
> * vm/reference/java/lang/VMThread.java (sleep): Don't round
> ms and pass ns to Object.wait, fixes mauve test.
The round up probably comes from join() which uses a similar way to
wait. And according to the bug pointed to in the comment apparently some
VMs mishandle a zero ms argument (we also had that bug in the past).
> - vt.wait(ms);
> + vt.wait(ms, ns);
> now = System.currentTimeMillis();
> if (now >= end)
> break;
Should we add a ns = 0 after wait() returns here? Whether or not you
think that change is necessary, please feel free to commit this.
Thanks,
Mark
signature.asc
Description: This is a digitally signed message part
- Re: [cp-patches] RFC: VMThread.sleep mauve fix,
Mark Wielaard <=