Returns a Future that completes as soon as the first Future in the array completes, with that Future's result, or its error if it failed.
asyncAnyOf(futures)
→ returns any
runAsync().
Returns the result of whichever task finishes first.
slow = runAsync(function(){ sleep(200); return "slow"; });
fast = runAsync(function(){ return "fast"; });
writeOutput(asyncAnyOf([slow, fast]).get());
Expected Result: fast
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.