Package groovy.concurrent
package groovy.concurrent
Structured concurrency abstractions for asynchronous and parallel programming.
Provides high-level concurrency primitives: Actor (message-passing),
AsyncScope (structured concurrency), Pool (thread management),
and ParallelScope (combined async+parallel).
Supports virtual threads (JDK 21+) and fail-fast exception handling.
-
ClassDescriptionActor<T>A lightweight message-passing actor for concurrent state management.ActorContext<T>Context handle passed to context-aware actor handlers.Construction-time configuration for an
Actor.Policy applied whenActor.send(Object)is called on an actor whose bounded mailbox is full.Policy applied whenActorContext.stash()is called and the actor's bounded stash is already at capacity.Agent<T>A thread-safe mutable-value container inspired by Clojure's agents and GPars'Agent.AsyncChannel<T>An asynchronous channel for inter-task communication with optional buffering.A structured concurrency scope that ensures all child tasks complete (or are cancelled) before the scope exits.Awaitable<T>Core abstraction for asynchronous computations in Groovy.Service Provider Interface (SPI) for adapting third-party asynchronous types to Groovy'sAwaitableabstraction and to iterables forfor awaitloops.Central registry forAwaitableAdapterinstances.AwaitResult<T>Represents the outcome of an asynchronous computation that may have succeeded or failed.A one-to-many broadcast channel where each value sent is delivered to all subscribers.A handle for a scheduled action that can be called off before it fires (or that can have its further firings suppressed, in the case of a recurring schedule).Thrown when anAsyncChanneloperation is attempted after the channel has been closed.Selects the first available value from multipleAsyncChannels.The result of aChannelSelect.select()operation, indicating which channel produced the value.Central configuration for Groovy's concurrent and parallel features.A single-assignment variable for dataflow-style programming.Convenience API for running work within a pool-isolatedAsyncScope.A managed thread pool for parallel and concurrent operations.ReactorHandler<T,R> Context-aware handler for reactor actors.StatefulHandler<S,T> Context-aware handler for stateful actors.