Expand description
Utilities for working with async.
Re-export of the [sycamore_futures
] crate.
Structs§
- Suspense
Scope - Represents a new suspense scope. This is created by a call to
create_suspense_scope
. - Suspense
Task Guard - A guard that keeps a suspense scope suspended until it is dropped.
Functions§
- await_
suspense_ current - Waits until all suspense task in current scope are completed.
- create_
detatched_ suspense_ scope - Create a new suspense scope that is detatched from the rest of the suspense hierarchy.
- create_
suspense_ scope - Calls the given function and registers all suspense tasks.
- create_
suspense_ task - Creates a new task that is to be tracked by the suspense system.
- provide_
executor_ scope - If running on
wasm32
target, does nothing. Otherwise creates a newtokio::task::LocalSet
scope. - spawn_
local - Spawns a
!Send
future. - spawn_
local_ scoped - Spawns a
!Send
future on the current scope. - use_
is_ loading - Returns a signal representing whether we are currently loading this suspense or not.
- use_
is_ loading_ global - Returns whether any suspense scope is current loading.