-
Notifications
You must be signed in to change notification settings - Fork 494
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 split
operation on indexed parallel iterators
#513
Comments
Hmm, I started implementing this, but it's awkward for iterators that own their data, like |
@cuviper ah, interesting -- very good point =) The fundamental thing that makes it awkward is that the two returned iterators need to be able to be dropped independently (per this design). You really would prefer to be iterating over this stuff in place though. Hmm. |
Or an |
It seems to me that there are enough design questions that it is worth taking this off the 1.0 milestone and iterating separately -- we can always add a In any case, I think we are going to want this to be a callback style, like producer, so that the types can vary and not be limited by associated types. |
Ah, add a separate trait because we're talking about a required method -- right. I agree on delaying it. When we get an RFC process going, this will be a good one to chew on. I'm also playing with a simpler |
While we wait for a thought out solution for rayon-rs#513. This commit causes 'skipped' sections of the Skip to be ignored completely and no iteration will be performed on those sections. This breaks promise of the Skip API that side-effects of the iteration are honored. The upside is that 'skipped' sections of the iterator are essentially zero-cost. For 'pure functional' workloads (deterministic workloads without IO) only. rayon-rs#513 see also: rayon-rs#352
Currently given an
IndexedParallelIterator
there is no way to divide it up other than skip/take which have side-effects. We were discussing the possibility of asplit
that takes an indexed iterator and yields back two of them around a particular index.The text was updated successfully, but these errors were encountered: