205: Implement simple work stealing r=yoshuawuyts a=stjepang
This is our first version of a work-stealing scheduler. We won't stop here, there is still lots of room for improvement.
Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
125: from/into stream r=yoshuawuyts a=yoshuawuyts
This adds `Stream` counterparts to `FromIterator`, `IntoIterator` and `Iterator::collect`, allowing to use the same patterns that are common in streams. Thanks!
## Tasks
- [x] `FromStream`
- [x] `IntoStream`
- [x] `Stream::collect`
## Screenshot
![Screenshot_2019-08-29 async_std stream - Rust](https://user-images.githubusercontent.com/2467194/63928985-ec2bd200-ca50-11e9-868c-9899800e5b83.png)
Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
180: adds stream::fold combinator r=stjepang a=montekki
Fold. Kind of clumsy around the part with the option and moving out of the shared context.
___
Stdlib: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.fold
Ref: #129
Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
203: expose std::pin r=yoshuawuyts a=yoshuawuyts
This is important when defining / calling futures, so it makes sense for us to also export this.
But also given recent user feedback on the confusion on pinning, I'd like to open up the possibility to experiment with providing better pinning facilities such as [`pin-project`](https://github.com/taiki-e/pin-project) or [`pin_mut`](https://docs.rs/pin-utils/0.1.0-alpha.4/pin_utils/macro.pin_mut.html) behind flags. I'm not sure if we could, or even should. But I want to allow us to have that conversation and test things out (even if it's just in floating patches.)
Thanks!
Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
190: Clean up the fs module and a few other places r=stjepang a=stjepang
Just a cleanup for various pieces of documentation, mainly around the `lib.rs` docs, the prelude, and the `fs` module. Some small bugs are also fixed along the way.
This PR is the first one in a series of review PRs that I will be submitting before the upcoming 1.0 release.
200: expose IoSlice, IoSliceMut r=stjepang a=yoshuawuyts
Exposes `io::IoSlice` and `io::IoSliceMut`. Given we're returning these from `read_vectored` and `write_vectored` it might make sense to just include them as part of our re-exports. Thanks!
Ref #131.
Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
198: Remove Unpin bound in `impl Stream for T` r=stjepang a=tirr-c
I guess this is not needed anymore since we have `poll_next` that receives `Pin` now. The original bound is moved to `Stream::next`.
Co-authored-by: Wonwoo Choi <chwo9843@gmail.com>
196: Remove more Unpin bounds for Stream::scan r=stjepang a=tirr-c
cc #192. I missed the bounds on `Stream::scan` itself.
Co-authored-by: Wonwoo Choi <chwo9843@gmail.com>
171: Add BufRead::consume r=stjepang a=yoshuawuyts
Ref #131. This implements `BufReader::consume`. Thanks!
Note on `fill_buf`: I couldn't get the `async fn fill_buf()` to work, but tracked progress for it here: https://gist.github.com/yoshuawuyts/09bbdc7823225ca96b5e35cd1da5d581. Got some lifetimes isssues. If anyone wants to give this a shot, please do!
Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>