Need to use proper synchronization. The CyclicBarriers might move the thread to WAITING state but not BLOCKED. So it should not confuse existing checks.
------------- Commit messages: - 8287200 Changes: https://git.openjdk.java.net/jdk/pull/8874/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8874&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287200 Stats: 9 lines in 1 file changed: 4 ins; 2 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8874.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8874/head:pull/8874 PR: https://git.openjdk.java.net/jdk/pull/8874