8342673: Test serviceability/jvmti/events/NotifyFramePopStressTest/NotifyFramePopStressTest.java failed: waited too long for notify

Reviewed-by: amenkov, lmesnik, sspitsyn
This commit is contained in:
Chris Plummer 2024-10-23 18:26:30 +00:00
parent a21c558699
commit 002de86081

View File

@ -78,6 +78,13 @@ public class NotifyFramePopStressTest {
log("control has started");
while (!done) {
suspend(thread);
if (done) {
// Double check after suspending the thread. We don't want to do the notify
// if the main thread thinks it is done. An untimely notify during the
// join() call will result in a deadlock.
resume(thread);
break;
}
if (notifyFramePop(thread)) {
notifyCount++;
log("control incremented notifyCount to " + notifyCount);