A function that returns a Future object, which is an eventual result of an asynchronous operation (like a promise in JavaScript)
The Future Object has the following functions:
cancel() returns Boolean
isCancelled() returns Boolean
isDone() returns Boolean
error() returns Future
get(closure, timezone) returns Future
then(closure, timezone) returns Future
Lucee Function Reference
runasync()
Example
runasync(object closure,[number timeout]):object
Category
async,thread,future
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
| Name | Type | Required | Default Value | Description |
|---|---|---|---|---|
| closure | object | Yes | Closure function that returns a Future object, which holds the result. | |
| timeout | number | No | 0 | timeout for the action |