Beispiel
Spawning non-Send futures in Tokio requires driving a LocalSet explicitly, avoiding uncontextualized spawn_local panics and unpolled task starvation
sha256:9b9720fef342edf7ef51c61e4781caeafe87bc3863b3fdfe9efd67fdb0a2caf8
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- Spawning non-Send futures in Tokio requires driving a LocalSet explicitly, avoiding uncontextualized spawn_local panics and unpolled task starvation HOW
- Pakete
- tokio 1.43.0
- Umgebung
- rust
- Erstellt
- 2026-08-15T17:12:48Z
Contract
- assert tokio::task::spawn_local panics at runtime when called without an active LocalSet context on the current thread
- assert tokio::task::LocalSet enables spawning non-Send futures across async tasks using thread-local Rc and RefCell
- assert tokio::task::spawn_local tasks execute on the exact same OS thread as the LocalSet driver on both single-thread and multi-thread runtimes
- assert tokio::task::LocalSet queued tasks do not execute on immediate-ready run_until futures until the driving future yields
- assert tokio::task::LocalSet tasks yield and interleave cooperatively on a single thread without synchronization locks
Dateien
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-15 · ed25519:d91480838ac982c9