-
Notifications
You must be signed in to change notification settings - Fork 640
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
Remove Stream impl from VecDeque in futures-core? #1879
Comments
This is not possible because
async-rs/async-std#213 is an error because "may be added |
So, I don't think there is a way to resolve async-rs/async-std#213 other than adding |
Personally, I am not against adding Also, if I remember correctly, someone said that |
Oh yes so Rayon has something very comparable working, and we're now investigating why it doesn't work. This issue is intended as separate from async-rs/async-std#123, looking forward to the roadblocks for implementing async-rs/async-std#129. If you know more on why async-rs/async-std#123 isn't working however, I'd love to hear more! People suspect it may be a compiler error? But it sounds like you may have it a bit clearer? edit: I just read the comments on async-rs/async-std#213. My bad; thanks for the detailed explanation @taiki-e! |
It works in rayon because they define I think I've mentioned @yoshuawuyts have you seen any usecases that |
I realize Also having
Could you say more about this? |
The closest idea I have to an async collection (something that can be iterated multiple times and give back the same elements, and probably randomly accessed via index; cf. an IO/in-memory stream that only gives you each value once) is something like a proxy to a remote collection with a limited local cache. In that case you would be accessing some underlying IO stream whenever you were getting access to a value, so even if you only wanted a shared reference to value you would need unique access to the underlying IO to populate the cache (along with ensuring the cache is not invalidated while the reference is live). The proxy could hide this internally via locking, but that would be unnecessary overhead if the usecases could all be supported by requiring unique access to the proxy. But, after detailing that I've argued myself into there being an additional usecase for (And I do think that having |
The impl in question was removed in #1930, so I'm removing this from the 0.3 milestone as I believe that we've made all necessary breaking changes. |
In
futures-core
theStream
trait is implemented forVecDeque
, which is the only type fromstd:: collections
this is done for.This is a problem for us because in
async-std
because of how we've setup some blanket impls, we can't implementIntoStream
forVecDeque
.Given this implementation is a bit of an odd one out, I'd like to propose we either move from
futures-core
tofutures
, or remove it all together.Thanks heaps!
References
The text was updated successfully, but these errors were encountered: