There's more...

If the MultithreadedTC library detects that all the threads of the test are blocked except in the waitForTick() method, the test is declared to be in a deadlock state and a java.lang.IllegalStateException exception is thrown.

Get Java 9 Concurrency Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.