Whatever message this page gives is out now! Go check it out!
future.whenComplete(action)| Parameter | Description |
|---|---|
| action | Required. A function (value, error). |
<cfscript>
future = runAsync(function() { return 10; }).thenApplyAsync(function(x) { return x * 2; }) .whenComplete(function(value, error) {
variables.completed = true;
variables.finalValue = value; });
future.get();writeOutput(variables.completed & ":" & variables.finalValue); // true:20
</cfscript>