mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8230423: Move os::sleep to JavaThread::sleep
Reviewed-by: rehn, dcubed
This commit is contained in:
parent
091cf3608b
commit
99252bd9d6
14 changed files with 84 additions and 79 deletions
|
@ -2990,7 +2990,7 @@ JVM_ENTRY(void, JVM_Sleep(JNIEnv* env, jclass threadClass, jlong millis))
|
|||
} else {
|
||||
ThreadState old_state = thread->osthread()->get_state();
|
||||
thread->osthread()->set_state(SLEEPING);
|
||||
if (os::sleep(thread, millis) == OS_INTRPT) {
|
||||
if (!thread->sleep(millis)) { // interrupted
|
||||
// An asynchronous exception (e.g., ThreadDeathException) could have been thrown on
|
||||
// us while we were sleeping. We do not overwrite those.
|
||||
if (!HAS_PENDING_EXCEPTION) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue