-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
b03
Thread.sleep used to be a sleepy place but there has been a bit of churn in the code recently to support virtual threads, add sleep(Duration), a JFR event, changing the underlying implementation to support sub-millis precision, and changeing the 2-arg sleep to make use of it. The changes have settled down now so we can do some cleanups that came up in PR discussions:
- Add a private sleepNanos method that creates/commits the JFR event around the sleep, this avoids duplicate code in the 3 sleep methods.
- Rename JVM_Sleep to JVM_SleepNanos to make it clear that it takes the sleep time in nanoseconds, esp. when Thread.sleep's parameter is milliseconds.
- Add a private sleepNanos method that creates/commits the JFR event around the sleep, this avoids duplicate code in the 3 sleep methods.
- Rename JVM_Sleep to JVM_SleepNanos to make it clear that it takes the sleep time in nanoseconds, esp. when Thread.sleep's parameter is milliseconds.
- relates to
-
JDK-8311222 strace004 can fail due to unexpected stack length after JDK-8309408
-
- Resolved
-