Skip to content

feat(watch): add a latest-state channel #215

Description

@tisonkun

Parent: #206

Goal

Add a latest-state watch channel in which receivers independently track whether they have observed the current version while intermediate updates may coalesce.

Contracts

  • The channel always retains one current value.
  • Each receiver tracks its own observed version.
  • borrow does not implicitly consume a change unless the selected API explicitly says so.
  • A final unseen value remains observable before disconnection is reported.

Acceptance criteria

  • Cover receiver cloning, subscriptions, change coalescing, cancellation, final-value draining, disconnection, and dropping replaced values outside internal locks.
  • Compare notification and borrow/update paths with Tokio watch.
  • Keep versioning and waiter machinery private.

Depends on #208 and the taxonomy in #167.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions