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

Add StreamExt::buffer_unordered_adaptable #1956

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

llebout
Copy link

@llebout llebout commented Nov 6, 2019

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.

@llebout llebout force-pushed the buffer-unordered-adaptable branch 5 times, most recently from a94e5eb to 16a0866 Compare November 10, 2019 07:56
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.
@llebout
Copy link
Author

llebout commented Nov 10, 2019

Finally, CI is successful. thumbv6m-none-eabi does not have atomic instructions? how does it even multi core?

@ebkalderon
Copy link
Contributor

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.

@taiki-e taiki-e added A-stream Area: futures::stream and removed futures-util labels Dec 17, 2020
@taiki-e taiki-e self-requested a review December 27, 2020 12:40
Copy link
Member

@taiki-e taiki-e left a 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 is 0 when buffer_unordered_adaptable is called.
  • max was not 0 when buffer_unordered_adaptable is called, but changed to 0.

(both are related to #2429 and #2348)

@taiki-e taiki-e added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author label Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stream Area: futures::stream S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants