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

Stream that take ownership of the Receiver #43

Open
vnghia opened this issue Mar 18, 2024 · 1 comment
Open

Stream that take ownership of the Receiver #43

vnghia opened this issue Mar 18, 2024 · 1 comment

Comments

@vnghia
Copy link

vnghia commented Mar 18, 2024

Hello, thank you very much for this crate. Exactly what I need for my application. I would like to ask:

How expensive to create one ReceiveStream from Receiver ?
If that is expensive, can you provide something like tokio ReceiverStream which takes the ownership of Receiver since axum::body::Body::from_stream requires an owned stream.

@fereidani
Copy link
Owner

Hi, thanks for your kind words. I might consider implementing it in the future. For current ReceiveStream cost is same as single Box allocation and for owned stream performance should be around cloning the channel instance itself + Box allocation, Pull requests are welcome.

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

2 participants