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

Sink impl for AsyncSender? #48

Open
silvanshade opened this issue Jun 27, 2024 · 0 comments
Open

Sink impl for AsyncSender? #48

silvanshade opened this issue Jun 27, 2024 · 0 comments

Comments

@silvanshade
Copy link

Would it be possible to add a SendSink for AsyncSender similar to ReceiveStream for AsyncReceiver? This would be nice to have and flume also supports this.

You could add a "sink" feature with an optional dependency on futures-sink to enable this.

I took a brief look at adding it myself but I'm not familiar enough with the internals to know the best way to implement SendSink.

In particular, I'm not entirely sure how to implement Sink::poll_flush and Sink::poll_close. I suspect that I need to use Signal to do this efficiently and somehow calculate when queue is empty but I haven't looked into it further.

@silvanshade silvanshade changed the title Sink impl for Sender? Sink impl for AsyncSender? Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant