Expand description
§Interior mutability between concurrent tasks on the same thread
This is an alternative to RefCell
without runtime
borrow checking, specifically tailored towards async. Instead of using
borrow guards, uses a closure API inspired by LocalKey::with()
for
greater guarantees in the asynchronous context (prevents holding onto the
mutable reference over an .await
point that yields to other tasks that
have access to the SharedCell
).
Macros§
- spawn
- Spawn a task on a
TaskGroup
, giving it access to a unique reference to a pinnedSharedCell
handle.
Structs§
- Shared
Cell - A cell that can be shared between async tasks running on the same thread
- Task
Group - A set of tasks that run together on the same thread, with shared data
Type Aliases§
- Shared
- Type alias for pinned
SharedCell