Module futures

Source
Expand description

Utilities for working with async.

Re-export of the [sycamore_futures] crate.

Structs§

SuspenseScope
Represents a new suspense scope. This is created by a call to create_suspense_scope.
SuspenseTaskGuard
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 new tokio::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.