lev.spawn

lev

spawn(fn, opts) -> task

Spawn a new concurrent task

Spawns fn as a new coroutine that runs concurrently within the current lev.run() event loop. Returns a task handle that can be passed to await().

Options: