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

Look for more places to add Collectors #3394

Open
cpovirk opened this issue Feb 28, 2019 · 0 comments
Open

Look for more places to add Collectors #3394

cpovirk opened this issue Feb 28, 2019 · 0 comments

Comments

@cpovirk
Copy link
Member

cpovirk commented Feb 28, 2019

It might be interesting to search our codebase for which Guava methods are called most often on the result of collect(toList()) and so forth. For example, I got to wondering whether Futures.whenAllSucceed/whenAllComplete is often used that way, in which case we might want to offer collect(whenAllSucceed()).call(...) (and maybe we'd then consider renaming call to thenCall?). (It looks like maybe on the order of 5% of all calls, which is not bad when you consider that we haven't had streams that long -- results saved internally as whenall-stream. [Edit: I estimate that roughly 2/3(!) of whenAll* calls were written after streams became available.])

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

No branches or pull requests

2 participants