提交 35228761 编写于 作者: S swamyv

6736461: ThreadMXBean Locks.java fails intermittently.

Summary: Fixed the test to wait for the right state before calling check thread information.
Reviewed-by: jjh
上级 42526c95
......@@ -197,8 +197,12 @@ public class Locks {
synchronized (ready) {
// wait until WaitingThread about to wait for objC
thrsync.waitForSignal();
// give chance to enter wait.
goSleep(100);
int retryCount = 0;
while (waiter.getState() != Thread.State.WAITING
&& retryCount++ < 500) {
goSleep(100);
}
checkBlockedObject(waiter, objC, null, Thread.State.WAITING);
synchronized (objC) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册