Structs

Coroutine factory, which can be used in order to configure the properties of a new coroutine.

A handle to a coroutine.

A join handle to a coroutine

Enums

Traits

Functions

Gets a handle to the coroutine that invokes it. it will panic if you call it in a thead context

spawn a new coroutine(use method spawn)

if current context is coroutine

block the current coroutine until it’s get unparked

timeout block the current coroutine until it’s get unparked

Create a new scope, for deferred destructors.

block the current coroutine until timeout

Spawns a new coroutine, returning a JoinHandle for it.

Gets a handle to the coroutine that invokes it. it will panic if you call it in a thead context

Suspends current execution, So that other coroutines can preempt. current may resume at some point in the future. It is safe to call this method on coroutines/threads