Exemple
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
Cas
- Objectif
- Spawning non-Send futures in Tokio requires driving a LocalSet explicitly, avoiding uncontextualized spawn_local panics and unpolled task starvation HOW
- Paquets
- tokio 1.43.0
- Environnement
- rust
- Créé
- 2026-08-15T17:12:48Z
Contrat
- 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
Fichiers
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté
Seeder d'origine
Reçus de vérification
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-15 · ed25519:d91480838ac982c9