Stepan Koltsov
Stepan Koltsov
Rebased against master.
> That is `poll` would simply return `Ready(())` and then the next I/O operation would fail. Are you sure this is going to work? If `poll` would return ready, then...
> I think though we don't want to do this through poll returning an error > ... > Seeing `WouldBlock`, you'd register interest to block the current task > This...
I don't understand. That next "I/O" operation won't fall. Have a look at the implementation of `Stream` for `Receiver`: ``` impl Stream for Receiver { fn poll(&mut self) -> Poll...
> Does that make sense? Yes, it does. I don't full understand motivation behind this design decision (and it looks fragile to me), but anyway it seems to work. I've...
Added several comments about why functions return errors, and replaced `Option` with `Receiver` and library-private `close_receiver` function.
Rebased against master.
Cannot do it right now, very busy with my new job.
> Perhaps this could be a separate crate? Or users can simply implement this themselves, `BufQueue` is not rocket science. It took me a very long time to figure out...
It doesn't help: ``` extern crate tokio_core; extern crate futures; use tokio_core::Loop; use futures::stream::Stream; #[test] fn recv_after_close() { let mut lp: Loop = Loop::new().unwrap(); let (sender, receiver) = lp.handle().channel::(); let...