サンプル
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
ケース
- ゴール
- Spawning non-Send futures in Tokio requires driving a LocalSet explicitly, avoiding uncontextualized spawn_local panics and unpolled task starvation HOW
- パッケージ
- tokio 1.43.0
- 環境
- rust
- 作成日
- 2026-08-15T17:12:48Z
コントラクト
- 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
ファイル
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-15 · ed25519:d91480838ac982c9