Package space.arim.omnibus.util.concurrent


package space.arim.omnibus.util.concurrent
Core interfaces for concurrency-related classes.

There are 2 frameworks in this package:

Empowered task scheduling, spearheaded by EnhancedExecutor, which enables more than just fixed rate / fixed delay scheduling by allowing delay calculators to determine delays between task execution dynamically.

Enhanced CompletionStage/CompletableFuture API in the form of ReactionStage/CentralisedFuture, which add Sync variants of CompletionStage methods to run synchronously with the main thread in accordance with the concept of a main thread as defined in SynchronousExecutor. Since such execution may encounter deadlocks if not done carefully, FactoryOfTheFuture is intended to be used to construct implementations of ReactionStage or subclasses of CentralisedFuture, which may employ special handling when awaiting completion.

Additionally, there are a few miscellanous helper classes, including CompetitiveFuture to change the default executor of a CompletableFuture by subclassing.