Whatever message this page gives is out now! Go check it out!
variables and other scopes as in your tests.future.thenApplyAsync(function)| Parameter | Description |
|---|---|
| function | Required. A function that takes the previous result and returns the next value. |
<cfscript>
variables.sharedValue = "test";
result = runAsync(function() {
return 1; }) .thenApplyAsync(function(x) { return x + 1; }) .thenApplyAsync(function(x) { return x * 2; }).thenApplyAsync(function(x) { return x & "_" & variables.sharedValue; }).get();
writeOutput(result); // 4_test
</cfscript>