Whatever message this page gives is out now! Go check it out!
future.runAfterBothAsync(other, action)| Parameter | Description |
|---|---|
| other | Required. The other Future to wait for. |
| action | Required. A function with no parameters that performs an action (void return). |
<cfscript>
f1 = runAsync(function() { return 1; });
f2 = runAsync(function() { return 2; });
f3 = runAsync(function() { sleep(1000); return 3;});
variables.executed = [];
future = f1.runAfterBothAsync(f2, function() { arrayAppend(variables.executed, "both");}).runAfterEitherAsync(f3, function() { arrayAppend(variables.executed, "either");});
future.get();writeOutput(arrayLen(variables.executed)); // 2
</cfscript>