File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -5205,14 +5205,15 @@ class INTERPRETER_CLASS
5205
5205
if ((millis > 0 ) || (nanos > 0 )) {
5206
5206
newState = JAVA_LANG_VIRTUALTHREAD_TIMED_WAITING;
5207
5207
}
5208
+ /* Reset the virtual thread's notified field before releasing Object monitor. */
5209
+ J9VMJAVALANGVIRTUALTHREAD_SET_NOTIFIED (_currentThread, _currentThread->threadObject , JNI_FALSE);
5208
5210
/* Try to yield the virtual thread if it will be blocked. */
5209
5211
UDATA result = preparePinnedVirtualThreadForUnmount (_currentThread, object, true );
5210
5212
VMStructHasBeenUpdated (REGISTER_ARGS);
5211
5213
if (J9_OBJECT_MONITOR_OOM != result) {
5212
5214
restoreInternalNativeStackFrame (REGISTER_ARGS);
5213
- /* Handle the virtual thread Object.wait call. */
5214
- J9VMJAVALANGVIRTUALTHREAD_SET_NOTIFIED (_currentThread, _currentThread->threadObject , JNI_FALSE);
5215
- /* VirtualThread.timeout is a private field used by both VM and JCL to temporarily hold
5215
+ /* Handle the virtual thread Object.wait call.
5216
+ * VirtualThread.timeout is a private field used by both VM and JCL to temporarily hold
5216
5217
* the value of expected wait/park time before a wake up task is scheduled using the value.
5217
5218
*/
5218
5219
J9VMJAVALANGVIRTUALTHREAD_SET_TIMEOUT (_currentThread, _currentThread->threadObject , millis + (nanos / 1000000 ));
You can’t perform that action at this time.
0 commit comments