Exemplo
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
- Pacotes
- tokio 1.43.0
- Ambiente
- rust
- Criado
- 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
Arquivos
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-15 · ed25519:d91480838ac982c9