RFR: 8282379: [LOOM] vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011 sometimes fails [v2]
Serguei Spitsyn
sspitsyn at openjdk.org
Tue Feb 7 01:52:50 UTC 2023
On Tue, 7 Feb 2023 00:56:21 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Get rid of Thread.sleep() in the invoked method can add warning comment.
>
> test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod011t.java line 94:
>
>> 92: while(!doExit) {
>> 93: l--; l++;
>> 94: Thread.currentThread().sleep(0);
>
> BTW this is an anti-pattern - use `Thread.sleep(n)` - it always applies to the current thread.
What about replacing sleep(0) with yield()?
Do we expect it also causing deadlocks? Was it considered?
-------------
PR: https://git.openjdk.org/jdk/pull/12420
More information about the serviceability-dev
mailing list