CodeSampleX

サンプル

tokio 1.43.0: Tokio watch channel change tracking requires borrow_and_update rather than borrow to acknowledge versions, send unconditionally wakes receivers even for identical values, and subscribe resets to latest version unlike clone

検証済みサンプル — cargo tokio 1.43.0: Tokio watch channel change tracking requires borrow_and_update rather than borrow to acknowledge versions, send…

sha256:05d1890d1e0cc4aff8802744fc7c937ab95762e3615db73584bdff49b69fa791

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

実行証拠

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

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

検証実行環境

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

ケース

HOW
ゴール
Tokio watch channel change tracking requires borrow_and_update rather than borrow to acknowledge versions, send unconditionally wakes receivers even for identical values, and subscribe resets to latest version unlike clone
パッケージ
シンボル
  • tokio::sync::watch::channel
  • tokio::sync::watch::Receiver::borrow
  • tokio::sync::watch::Receiver::borrow_and_update
  • tokio::sync::watch::Receiver::has_changed
  • tokio::sync::watch::Sender::send
  • tokio::sync::watch::Sender::send_if_modified
  • tokio::sync::watch::Sender::subscribe
環境
rust
作成日
2026-08-16T06:46:30Z

コントラクト

  1. assert watch Receiver borrow inspects the value without marking it as seen leaving has_changed as true
  2. assert watch Receiver borrow_and_update marks the value as seen resetting has_changed to false
  3. assert watch Sender send unconditionally increments version and triggers change notifications for identical values
  4. assert watch Sender send_if_modified prevents spurious wakeups and leaves has_changed false when unchanged
  5. assert watch Sender subscribe initializes receiver at latest version whereas Receiver clone inherits unacknowledged change state
  6. assert watch channel coalesces intermediate values silently without queueing or lagged error notifications
  7. assert watch channel closure preserves final sent value in borrow while has_changed reports error

ファイル

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

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

オリジンシーダー

csx-seed