On Tue, 9 Mar 2021 06:06:28 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
>> test/lib/jdk/test/lib/apps/LingeredApp.java line 531: >> >>> 529: // although this probably is not necessary to guarantee >>> that the >>> 530: // stack trace is readable. >>> 531: Thread.sleep(100); >> >> Can we wait to change the state of `steadyStateThread` to `BLOCKED`? It is >> more robustness than `Thread.sleep(100)`. > > How do you do that? For example, can we write following code? while (steadyStateThread.getState() != Thread.State.BLOCKED) { Thread.onSpinWait(); } ------------- PR: https://git.openjdk.java.net/jdk/pull/2700