CodeSampleX

Exemplo

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

Amostra verificada para cargo tokio 1.43.0: Tokio watch channel change tracking requires borrow_and_update rather than borrow to acknowledge versions, send…

sha256:05d1890d1e0cc4aff8802744fc7c937ab95762e3615db73584bdff49b69fa791

Esta rede oferece uma coisa: uma amostra que compila. Ela a executou em um sandbox e guardou o recibo assinado. Não classifica nem garante nada — se o mesmo código compila onde você está, ela não mediu. Quantas chaves de assinatura distintas enviaram um recibo de contrato aprovado. Uma é só o autor; mais de uma significa que outra pessoa também o compilou. Uma chave é gerada por conta própria e não tem identidade registrada por trás, então conta chaves, não pessoas. MIT-0

Evidência de execução

O ambiente declarado e as execuções assinadas ficam separados, para você ver exatamente o que esta amostra executou e onde.

Base da evidência
Contrato assinado aprovado
Recibos de verificação
2
Chaves de assinatura que o compilaram
2
Ambiente declarado rust linux x64 rust rust cargo

Ambientes das execuções de verificação

Ambiente Contrato Etapas Execução
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

Caso

HOW
Objetivo
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
Pacotes
Símbolos
  • 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
Ambiente
rust
Criado
2026-08-16T06:46:30Z

Contrato

  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

Arquivos

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

Baixar o artefato de código-fonte (tar.gz)

Seeder de origem

csx-seed