File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/thread Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -981,25 +981,20 @@ static void unpark(Thread thread) {
981981 }
982982
983983 /**
984- * Sleeps for the given number of nanoseconds, wake-ups and interruptions.
984+ * Sleeps for the given number of nanoseconds, dealing with early wake-ups and interruptions.
985985 */
986986 static void sleep (long nanos ) throws InterruptedException {
987987 assert !isCurrentThreadVirtual ();
988- sleep0 (nanos );
989- }
990-
991- /** Sleep for the given number of nanoseconds, dealing with early wakeups and interruptions. */
992- static void sleep0 (long nanos ) throws InterruptedException {
993988 if (nanos < 0 ) {
994989 throw new IllegalArgumentException ("Timeout value is negative" );
995990 }
996- sleep1 (nanos );
991+ sleep0 (nanos );
997992 if (Thread .interrupted ()) { // clears the interrupted flag as required of Thread.sleep()
998993 throw new InterruptedException ();
999994 }
1000995 }
1001996
1002- private static void sleep1 (long durationNanos ) {
997+ private static void sleep0 (long durationNanos ) {
1003998 VMOperationControl .guaranteeOkayToBlock ("[PlatformThreads.sleep(long): Should not sleep when it is not okay to block.]" );
1004999 Thread thread = currentThread .get ();
10051000 Parker sleepEvent = getCurrentThreadData ().ensureSleepParker ();
You can’t perform that action at this time.
0 commit comments