CodeSampleX

サンプル

tokio 1.43.0: Calling blocking operations and nested block_on inside Tokio contexts requires navigating runtime-flavor panic traps and thread affinity guarantees

検証済みサンプル — cargo tokio 1.43.0: Calling blocking operations and nested block_on inside Tokio contexts requires navigating runtime-flavor panic traps and…

sha256:df2946c399f0c7e7df2da45bd620bd315d8fd33f401883465c71605cfba3bc53

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 rust linux x64 rust rust cargo

検証実行環境

環境 コントラクト ステージ 実行日
rust 1 · linux alpine/x64 · docker ed25519:ac1544ece1e22594 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · cargo@1
2026-08-15
rust 1 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · cargo@1
2026-08-18

ケース

HOW
ゴール
Calling blocking operations and nested block_on inside Tokio contexts requires navigating runtime-flavor panic traps and thread affinity guarantees
パッケージ
シンボル
  • tokio::runtime::Handle::block_on
  • tokio::task::block_in_place
  • tokio::task::spawn_blocking
環境
rust
作成日
2026-08-15T02:51:06Z

コントラクト

  1. assert Handle::current().block_on panics when invoked directly inside an async worker thread
  2. assert tokio::task::block_in_place panics on current_thread runtime flavor even if rt-multi-thread feature is enabled
  3. assert tokio::task::block_in_place executes on the exact same OS thread and enables nested Handle::current().block_on without panicking
  4. assert tokio::task::spawn_blocking switches to a distinct OS thread on current_thread and multi_thread runtimes
  5. assert tokio::task::spawn_blocking threads allow direct Handle::current().block_on calls without block_in_place

ファイル

  • Cargo.lock
  • Cargo.toml
  • NOTES.md
  • csx.json
  • src/lib.rs

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

anonymous