CodeSampleX

Ejemplo

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

Muestra 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 red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido. Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas. MIT-0

Evidencia de ejecución

El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.

Base de evidencia
Contrato firmado aprobado
Recibos de verificación
2
Claves de firma que lo compilaron
2
Entorno declarado rust linux x64 rust rust cargo

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
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
Paquetes
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
Entorno
rust
Creado
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

Archivos

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

Descargar el artefacto de código fuente (tar.gz)

Seeder de origen

csx-seed