Tanguv0.35.0
System & I/O4 exports
Raw Markdown

/runtime

Multi-threaded Tokio async runtime construction and blocking entry points (Async-Runtime, run, block-on).

(use /runtime)

Functions & symbols#

Async-Runtime#

function
(Async-Runtime) -> AsyncRuntime

Constructs a multi-threaded Tokio `AsyncRuntime` instance.

Returns:Any
(let rt (runtime/Async-Runtime))

Async-Runtime-construct#

constructor
(Async-Runtime-construct) -> AsyncRuntime

Underlying constructor backing `(Async-Runtime)`.

Returns:Any
(let rt (runtime/Async-Runtime-construct))

block-on#

function
(block-on rt func) -> Any

Executes `func` on `rt` and blocks until all spawned async operations complete.

ParameterTypeOptionalDescription
rtAsyncRuntimerequiredRuntime instance
funcFuncrequiredZero-argument closure executed inside `rt`
Returns:Any
(runtime/block-on rt (Func () (run-server)))

run#

function
(run rt func) -> Any

Dynamically binds `*runtime*` to `rt` and drives `func` to completion.

ParameterTypeOptionalDescription
rtAsyncRuntimerequiredRuntime instance
funcFuncrequiredZero-argument closure run with `*runtime*` dynamically bound to `rt`
Returns:Any
(runtime/run (runtime/Async-Runtime) (Func () (main)))