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

Rayon support: FromParallelIterator & ParallelExtend #3

Closed
vorner opened this issue Jun 14, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@vorner
Copy link
Owner

commented Jun 14, 2019

The aim here is to be able to create the collections from parallel iterators in the „naturally“ parallel way. Please implement them for both ConMap and ConSet (not necessarily in the same pull request). I expect the traits to be quite similar to the basic ones (FromIterator and Extend, they are already implemented for ConMap), except that they would not use single-threaded for cycle, but probably parallel iterator's for_each to take advantage of multiple threads.

https://docs.rs/rayon/1.1.0/rayon/iter/trait.FromParallelIterator.html
https://docs.rs/rayon/1.1.0/rayon/iter/trait.ParallelExtend.html

Please also provide few tests trying this out (some trivial ones like collecting a range in parallel into the collection are enough) and put the dependency on rayon behind a feature gate (so the crate depends on it only if the user wants it).

Note that the third related trait (IntoParallelIterator) is not part of this particular ticket, since I expect it to be significantly harder (read: I haven't thought it through yet).

I'm happy to answer questions or provide help. If you want to work on the task, please claim it by writing a comment.

Few leftovers

  • Run CI with and without the rayon feature enabled. It is probably enough to run with default features and with --all-features.
  • Docs: Add a crate-level section about available features and describe the rayon feature there, so users know they can turn it on.
  • Docs: Build documentation for docs.rs with the rayon flags turned on. It's described here how to do that: https://docs.rs/about.
@leshow

This comment has been minimized.

Copy link
Contributor

commented Jun 17, 2019

I'll take this one if that's okay with you

@vorner

This comment has been minimized.

Copy link
Owner Author

commented Jun 18, 2019

Sure, of course :-).

(That means the created easy/good-first-issue have run out, I'll just have to create few more soon)

@vorner

This comment has been minimized.

Copy link
Owner Author

commented Jun 30, 2019

I've reopened it, there are few tiny leftovers. @leshow Do you want to do them too?

@leshow

This comment has been minimized.

Copy link
Contributor

commented Jun 30, 2019

Yeah, I'll take the stragglers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.