[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cp-patches] Implementing Thread.sleep() via Thread.wait()

From: Mark Wielaard
Subject: RE: [cp-patches] Implementing Thread.sleep() via Thread.wait()
Date: Fri, 31 Dec 2004 12:08:46 +0100


On Fri, 2004-12-31 at 11:28 +0100, Jeroen Frijters wrote:
> Mark Wielaard wrote:
> > > +   * A zero length sleep is equivalent to 
> > <code>Thread.yield()</code>.
> > 
> > I think this is not a good idea. This is not supported by any
> > documentation. And I agree with you that it is probably a bug in the
> > implementation you tested and filed a bug report for the fact that
> > sleep(0) seems to ignore the interrupted state of the Thread. 
> > And if we want to add this bug to our implementation (and I think
> > we shouldn't) why Thread.yield(), why not just return?
> As we apparently can't seem to agree on this, at the very least lets
> just leave open the option for the VM to do whatever it wants (as I
> originally proposed).

Sure if you think that is a good idea. But are you sure we want to
encourage arbitrary behavior? I believe we should try to
encourage/document consistent and nonsurprizing behavior. I do like the
version of VMThread that Archie submitted (just not the changes made to
Thread.sleep() itself).



Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]