-
Notifications
You must be signed in to change notification settings - Fork 626
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
Add StreamExt::buffer_unordered_adaptable #1956
base: master
Are you sure you want to change the base?
Conversation
a94e5eb
to
16a0866
Compare
It might be desirable to have adaptative parallelism for the processing of buffered futures. An example use case would be to cope with the ever changing network conditions when sending requests to a remote host. One might collect metrics about the performance of the data transfer and adapt the parallelism parameters as necessary to maximize throughput.
16a0866
to
2134e4d
Compare
Finally, CI is successful. thumbv6m-none-eabi does not have atomic instructions? how does it even multi core? |
Nice work on this pull request! Exactly what I was looking for in a personal project. In regards to your question, according to rust-lang/rust#54250, it seems that the platform simply does not support certain atomic operations in hardware. |
… buffer-unordered-adaptable
…s-rs into buffer-unordered-adaptable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR and sorry for the late review!
I'm okay with adding such a feature, but I would like to have tests and docs for the following cases:
max
is0
whenbuffer_unordered_adaptable
is called.max
was not0
whenbuffer_unordered_adaptable
is called, but changed to0
.
It might be desirable to have adaptative parallelism for the
processing of buffered futures.
An example use case would be to cope with the ever changing
network conditions when sending requests to a remote host.
One might collect metrics about the performance of the
data transfer and adapt the parallelism parameters as
necessary to maximize throughput.