Module task

Module task 

Source

Functionsยง

dispatch
Spawns a new asynchronous task in the background without a handle. Basically the same as spawn.
spawn
Spawns a new asynchronous task in the background, returning a Future JoinHandle for it.
spawn_abortable
Spawns a new asynchronous task in the background, returning an abortable handle that will cancel the task once the handle is dropped.
spawn_coroutine
Spawns a new asynchronous task that accepts messages to the task using channels. This function returns a handle that allows sending a message, or if there is no reference to the handle at all (in other words, all handles are dropped), the task would be aborted.
spawn_coroutine_with_context
Spawns a new asynchronous task with provided context that accepts messages to the task using channels. This function returns a handle that allows sending a message, or if there is no reference to the handle at all (in other words, all handles are dropped), the task would be aborted.
spawn_unbounded_coroutine
Spawns a new asynchronous task that accepts messages to the task using channels. This function returns a handle that allows sending a message, or if there is no reference to the handle at all (in other words, all handles are dropped), the task would be aborted.
spawn_unbounded_coroutine_with_context
Spawns a new asynchronous task with provided context that accepts messages to the task using channels. This function returns a handle that allows sending a message, or if there is no reference to the handle at all (in other words, all handles are dropped), the task would be aborted.
yield_now
Yields execution back to the runtime