Whatever message this page gives is out now! Go check it out!
future.completeOnTimeout(value, timeout)| Parameter | Description |
|---|---|
| value | Required. Default value to use if the Future times out (any type). |
| timeout | Required. Timeout in milliseconds (numeric). |
<cfscript>
f1 = runAsync(function() {
sleep(200); return 10;}).completeOnTimeout(0, 50);
f2 = runAsync(function() {
return 20; });f3 = runAsync(function() { return 30; });
allFuture = asyncAllOf([f1, f2, f3]);
allFuture.get();
writeOutput(f1.get() + f2.get() + f3.get()); // 50
</cfscript>