auralis-task: Scoped async task runtime with explicit [TaskScope]
hierarchy, iterative cancellation, and priority scheduling.
Architecture
- Global executor — a [
thread_local!] singleton with high- and low-priority queues. TaskScope— owns spawned futures; dropping a scope cancels all descendant scopes and their tasks iteratively (no recursion), preventing stack overflows in deeply nested UI trees.set_deferred— safe signal mutation from [Drop] contexts.- Pluggable storage — [
ScopeStore] and [Executor::new_instance] enable multi-request isolation for SSR or multi-threaded runtimes.
Quick example
use ;
let scope = new;
scope.spawn;
Design decisions
The crate shares auralis_signal's single-threaded-by-default
philosophy (Rc over Arc, RefCell over Mutex). For
multi-threaded use-cases, create an isolated [Executor] instance
per thread or per request. See the repository design docs for the
full rationale.