Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equivalent of tokio::sync::watch #311

Open
joshtriplett opened this issue Jun 8, 2024 · 2 comments
Open

Equivalent of tokio::sync::watch #311

joshtriplett opened this issue Jun 8, 2024 · 2 comments

Comments

@joshtriplett
Copy link
Contributor

I'd love to have an equivalent of the tokio::sync::watch types. These provide a channel that stores only the latest value sent. This is convenient for request coalescing: first one in creates the watch and spawns a task to do the request, subsequent requests wait on the existing watch.

@notgull
Copy link
Member

notgull commented Jun 9, 2024

Yes, this would be a nice addition. It would probably be a separate crate.

@notgull
Copy link
Member

notgull commented Jun 9, 2024

There is async-watch, which is based on tokio's implementation and built on event-listener. But it hasn't been updated for several years.

Poke @cynecx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants