Async

async


Builtin (async func args...) Calls a function asynchronously with a given set of arguments

Note: The function is started in a separate context, with no access to the others, preventing any concurrency problems.

Parameters

  • func: the function to call
  • args...: the arguments of the function

Author

@SuperFola

Example

(let foo (fun (a b) (+ a b)))
(async foo 1 2)

await


Builtin (await future) Blocks until the result becomes available

Parameter

  • future: the future to wait for its result to be available

Author

@SuperFola

Example

(let foo (fun (a b) (+ a b)))
(let async-foo (async foo 1 2))
(print (await async-foo))