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

Use a manual Future impl for methods #22

Closed
yoshuawuyts opened this issue Oct 28, 2020 · 3 comments · Fixed by #33
Closed

Use a manual Future impl for methods #22

yoshuawuyts opened this issue Oct 28, 2020 · 3 comments · Fixed by #33

Comments

@yoshuawuyts
Copy link
Member

I'm wrapping Receiver::recv and Sender::send in structs. Because they're async fn instead of manual Future impls they require boxing when stored. It'd be nice if we could expose two new types:

  • RecvFuture
  • SendFuture

These would not require boxing, which means they can be inlined in implementations and would increase overall perf when wrapping async-channel. Given the simplicity of send and recv I suspect the implementation to be rather straight forward.

Thanks!

@yoshuawuyts
Copy link
Member Author

Ran into this again today; still stand by that this is a change we should implement.

@fogti
Copy link
Member

fogti commented Feb 17, 2021

This would probably require similarly exposed Future impls in event-listener.

@yoshuawuyts
Copy link
Member Author

Filed a PR here: #33

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

Successfully merging a pull request may close this issue.

2 participants