rontolisp:async-lambda
(rontolisp:async-lambda (params...) body...)
The anonymous counterpart of rontolisp:async-defun: evaluates to a function value whose invocation returns a future. The parameter list supports the same lambda-list keywords as lambda, and the body follows the same semantics as an async-defun body — it starts eagerly on invocation, may use rontolisp:await, and its value (or error) settles the returned future. (rontolisp:async (lambda ...)) — the rontolisp:async wrapper — is an equivalent JavaScript-style spelling.
Being a function value, it can be passed around like any other function; each invocation returns a fresh future:
Backend support
Identical to rontolisp:async-defun: virtual threads on the interpreter and JVM, the component's asynchronous task under WASM --component, immediate completion on Preview 1 WASM, and a compile error under --no-gc.