Wait for a Thread to be in a State
A Condition that allows you to test if a thread is in a waiting state. For example,
Conditions.is(Thread thread, Thread.State state)
A more general purpose
Condition to check that a thread is in a given state. For example,
Checks that a thread is alive. A thread is alive if it has been started and has not yet died. For example,
Wait for an Executor to Shutdown
Checks that a
java.util.concurrent.ExecutorService has been shutdown according to the result of the it's
isShutdown method. This might be useful if you'd like to wait for shutdown. The tempus-fugit
ExecutorServiceShutdown class does just this.
Invert a Condition
NotCondition will negate the logical result of some other condition. For example, we can change the example above to wait until a thread is not in a waiting state by using the following.