concurrency

Java Concurrency Library, providing features not in the Java runtime

1. Waitable, a thread safe generic reference, supporting multiple threads waiting for different conditions.

2. StateMachine, a generic state machine, supporting states, rules, triggers, and waiting for state changes.

Waitable example:
// Creating a Waitable
Waitable<String> weather = GlobalConcurrency.createWaitable("Unknown");

// Changing the value
weather.accept("Sunny");

// Waiting for a condition
final Optional<String> match = weather.waitFor(s -> !s.contains("Rain"), Duration.ofSeconds(10));
if (match.isPresent()) {
    goForWalk();
}

Documentation and Reports

Java API

Java Test Coverage

Badges

OpenSSF Best Practices Coverage Badge Javadoc Badge