classpath-patches
[Top][All Lists]
Advanced

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

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


From: Jeroen Frijters
Subject: RE: [cp-patches] Implementing Thread.sleep() via Thread.wait()
Date: Thu, 30 Dec 2004 23:21:16 +0100

> Archie Cobbs wrote:
> Any reason we can't just implement Thread.sleep() entirely 
> in Java using Thread.wait() on the vmThread object?

There are several reasons why this isn't a good idea[1], but it would
make sense to use this approach as the default implementation of
VMThread.sleep.

[1] We're trying to design a stable -- long term -- VM interface, right?
Clever hacks like this don't fit with that. What if a VM wants to
support nanosecond sleep periods?

Regards,
Jeroen




reply via email to

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