Whatever message this page gives is out now! Go check it out!

Asynchronous functions

Last update:
May 18, 2026
Lists ColdFusion functions and Future methods used for asynchronous coordination, timeouts, executor-based chaining, and async completion handling.

About this category

These APIs work with the CFML Future type (for example values returned from runAsync). Standalone functions accept arrays of futures. Member methods are invoked on a Future instance. Methods whose names end with Async run follow-up work on the async executor instead of only on the completing thread.
For synchronous chaining and completion methods (no Async suffix), see the same map under Chaining — sync and Completion and errors — sync.

Standalone coordination functions

asyncAllOf — returns a Future that completes when every Future in an array completes.
asyncAnyOf — returns a Future that completes when any one Future in an array completes first.

Timeout (Future methods)

Attach deadlines to a single Future.
orTimeout — fails the Future if it does not complete within a timeout.
completeOnTimeout — completes with a default value if the Future does not finish in time.

Chaining — async (executor)

Run the next stage on the async thread pool.
thenApplyAsync — map the result to a new value asynchronously.
thenAcceptAsync — run a side-effect callback with the result asynchronously.
thenRunAsync — run a parameterless action asynchronously after completion.
thenComposeAsync — flat-map to another Future asynchronously.
thenCombineAsync — when two futures complete, combine both results asynchronously.
thenAcceptBothAsync — run a side effect with both results asynchronously.
runAfterBothAsync — run a parameterless action after both futures complete.
applyToEitherAsync — use whichever future completes first, map the value asynchronously.
acceptEitherAsync — consume the first completing result asynchronously.
runAfterEitherAsync — run a parameterless action after either future completes.

Completion and errors — async

Observe or recover from completion on the async executor.
whenCompleteAsync — run a callback with result and error when complete.
handleAsync — map result and error to a new value asynchronously.
exceptionallyAsync — map failures to a recovery value asynchronously.
exceptionallyComposeAsync — map failures to a recovery Future asynchronously.

Quick reference table

Function or methodSummary
asyncAllOfWait for all futures in an array.
asyncAnyOfComplete when any future in an array finishes first.
orTimeoutFail if the stage exceeds a time limit.
completeOnTimeoutSupply a default value on timeout.
thenApplyAsyncAsync map of the successful value.
thenAcceptAsyncAsync side effect with the value.
thenRunAsyncAsync parameterless follow-up.
thenComposeAsyncAsync flat-map to another Future.
thenCombineAsyncAsync merge of two successful results.
thenAcceptBothAsyncAsync side effect with both values.
runAfterBothAsyncAsync action after both complete.
applyToEitherAsyncAsync map of the first completing value.
acceptEitherAsyncAsync consume the first completing value.
runAfterEitherAsyncAsync action after either completes.
whenCompleteAsyncAsync observe completion (result and error).
handleAsyncAsync fold result or error into a new value.
exceptionallyAsyncAsync recover from failure with a value.
exceptionallyComposeAsyncAsync recover from failure with a Future.

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page