Provides high-level concurrency primitives: Actor (message-passing), AsyncScope (structured concurrency), groovy.concurrent.Pool (thread management), and groovy.concurrent.ParallelScope (combined async+parallel). Supports virtual threads (JDK 21+) and fail-fast exception handling.
| Interface | Description |
|---|---|
| Actor | A lightweight message-passing actor for concurrent state management. |
| AsyncChannel | An asynchronous channel for inter-task communication with optional buffering. |
| AsyncScope | A structured concurrency scope that ensures all child tasks complete (or are cancelled) before the scope exits. |
| Awaitable | Core abstraction for asynchronous computations in Groovy. |
| AwaitableAdapter | Service Provider Interface (SPI) for adapting third-party asynchronous types
to Groovy's Awaitable abstraction and to iterables for
for await loops. |
| Pool | A managed thread pool for parallel and concurrent operations. |
| Class | Description |
|---|---|
| Agent | A thread-safe mutable-value container inspired by Clojure's agents and
GPars' Agent. |
| AwaitResult | Represents the outcome of an asynchronous computation that may have succeeded or failed. |
| AwaitableAdapterRegistry | Central registry for AwaitableAdapter instances. |
| BroadcastChannel | A one-to-many broadcast channel where each value sent is delivered to all subscribers. |
| ChannelSelect | Selects the first available value from multiple AsyncChannels. |
| ChannelSelect.Result | The result of a select() operation, indicating which channel produced the value. |
| ConcurrentConfig | Central configuration for Groovy's concurrent and parallel features. |
| DataflowVariable | A single-assignment variable for dataflow-style programming. |
| Dataflows | A dynamic map of DataflowVariable instances, providing a concise syntax for dataflow-style programming. |
| ParallelScope | Convenience API for running work within a pool-isolated AsyncScope. |
| Exception | Description |
|---|---|
| ChannelClosedException | Thrown when an AsyncChannel operation is attempted after the channel has been closed. |