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

thenCombine (Future method)

Last update:
Jun 9, 2026
Waits for this Future and another Future, then runs your combiner on the completing thread.

Description

Synchronous counterpart to thenCombineAsync.

Returns

A new Future.

Category

Asynchronous programming

Function syntax

future.thenCombine(other, function)

Parameters

ParameterDescription
otherRequired. The other Future to wait for.
functionRequired. A function (resultA, resultB) that returns the combined value.

See also

Example

Same numeric pattern as the async variant; combiner runs on the completing thread.

<cfscript>
    f1 = runAsync(function() { return 10; });
    f2 = runAsync(function() { return 20; });
    combined = f1.thenCombine(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