# Package org.apache.groovy.runtime.async

## Package org.apache.groovy.runtime.async Description

Runtime support for Groovy's `async`/`await`/`defer` language features.

Layout:

- AsyncSupport — public entry point used by compiler-generated code and by Awaitable
- `AsyncExecutors` — executor/scheduler configuration
- `AwaitCombinators` — `all`/`any`/`first`/ `allSettled` joining algorithms
- GroovyPromise — default Awaitable implementation
- GeneratorBridge — producer/consumer bridge for `yield return`
- DefaultAsyncScope, DefaultAsyncChannel — structured concurrency and CSP channel implementations

- Class Summary
  Class | Description
  --- | ---
  AsyncClosureUtils | Closure-specific async utilities that have no pure-Java equivalent.
  AsyncSupport | Internal runtime support for the `async`/`await`/`defer` language features.
  DefaultActor | Default implementation of Actor.
  DefaultAsyncChannel | Default lock-based implementation of AsyncChannel.
  DefaultAsyncScope | Default implementation of AsyncScope providing structured concurrency with configurable failure policy.
  DefaultPool | Default implementation of Pool.
  FlowPublisherAdapter | Adapter for Publisher, the JDK's built-in Reactive Streams type.
  GeneratorBridge | A producer/consumer bridge for async generators (`yield return`).
  GroovyPromise | Default Awaitable implementation backed by a CompletableFuture.
  ScopedLocal | A thread-scoped value holder that abstracts over ThreadLocal (JDK < 25) and `java.lang.ScopedValue` (JDK 25+), presenting a unified API modelled after `ScopedValue`.
  ScopedLocal.Carrier | An immutable set of scoped-local bindings that can be applied atomically for the duration of a Runnable or Supplier.
  SelectClaim | The single-winner state of one selection: the arbiter through which a group of competing offers (the branches of a ChannelSelect, or a lone channel operation) commits exactly one outcome between them.