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

thenCombineAsync (Future method)

Last update:
May 18, 2026
Waits for this Future and another Future, then runs your function with both results on the async executor.

Description

thenCombineAsync coordinates two independent async operations. When both complete normally, the combiner function receives both values and returns a single new value wrapped in a new Future.

Returns

A new Future.

Category

Asynchronous programming

Function syntax

future.thenCombineAsync(other, function)

Parameters

ParameterDescription
otherRequired. The other Future to wait for.
functionRequired. A function with two parameters (this result, other result) that returns the combined value.

See also

Example

Add two async values (from product tests).

  <cfscript>
    f1 = runAsync(function() { return 10; });
    f2 = runAsync(function() { return 20; });
    combined = f1.thenCombineAsync(f2, function(x, y) {    return x + y;});
    writeOutput(combined.get()); // 30
</cfscript>
      

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