You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maybe worth supporting something like RwLock<&mut HashMap>
could be practical in some scenarios...
or maybe collecting up pairs in a vec and then (transparently) storing them into the hashmap after, as a seq step?
support for more parallel iterator types:
vecs can support bounded iterators, but they need a "compact" step
have to be careful about panics, though we can leak if needed
Well, ok, that's not very organized. But I feel like we can put a bit more effort into making this ergonomic and "bridging" between various things. I'm torn. =)
I suspect we'll wind up with more than just collect_into, in any case, though specialization might help here too.
The text was updated successfully, but these errors were encountered:
What is the compaction step you're talking about? It seems like it should be possible to tightly pack the vec being collected into using an atomic counter for the next index to write into.
In general, it'd be nice if
collect_into()
were more flexible and convenient. We may need multiple APIs in the end. Some things I would like:collect()
that allocates a new collection, as with sequential iterators;collect_into()
intoextend()
and have it work likeextend()
?RwLock<&mut HashMap>
Well, ok, that's not very organized. But I feel like we can put a bit more effort into making this ergonomic and "bridging" between various things. I'm torn. =)
I suspect we'll wind up with more than just
collect_into
, in any case, though specialization might help here too.The text was updated successfully, but these errors were encountered: