# watch: Add snapshot-based channels \(\#63964\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f9a1fc898baee129f051dd41c9af7b9c60a654ac)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f9a1fc898baee129f051dd41c9af7b9c60a654ac

Requested commit: f9a1fc898baee129f051dd41c9af7b9c60a654ac

Commit: f9a1fc898baee129f051dd41c9af7b9c60a654ac

Tree: 5b05a5c37f0fd638a9a1ccdde67a87610f4ed387

Author: Lukas Wirth

Committer: GitHub

## Message

```
watch: Add snapshot-based channels (#63964)

Add an opt-in watch channel that atomically publishes immutable, owned
snapshots rather than holding a reader/writer lock. Readers can retain a
value without delaying publication.

Use independent atomic wakers for receivers while preserving
latest-value coalescing and channel closure semantics. Keep the existing
watch implementation unchanged and document when to choose each
implementation.

Release Notes:

- N/A
```

## Parents

- [52b2927a1bac46be5d50ad341ac00b665e13764b](https://git.cafe/gitcafe/zed/commit/52b2927a1bac46be5d50ad341ac00b665e13764b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f9a1fc898baee129f051dd41c9af7b9c60a654ac?format=markdown)
