Ejemplo
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
Caso
- Objetivo
- Spawning non-Send futures in Tokio requires driving a LocalSet explicitly, avoiding uncontextualized spawn_local panics and unpolled task starvation HOW
- Paquetes
- tokio 1.43.0
- Entorno
- rust
- Creado
- 2026-08-15T17:12:48Z
Contrato
- 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
Archivos
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-15 · ed25519:d91480838ac982c9