Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAmend I/O reform RFC to address issues with flush #950
Conversation
mzabaluev
added some commits
Mar 6, 2015
glaebhoerl
reviewed
Mar 7, 2015
| @@ -596,13 +616,17 @@ method, clients of `Read` can easily recover the `push` method. | |||
| ### `Write` | |||
| [Write]: #write | |||
|
|
|||
| The `Writer` trait is cut down to even smaller size: | |||
| The `Writer` trait is cut down to even smaller size, and `flush` is taken | |||
This comment has been minimized.
This comment has been minimized.
glaebhoerl
Mar 7, 2015
Contributor
Writer doesn't really get any smaller - all of the same methods are still there - just refactored.
This comment has been minimized.
This comment has been minimized.
jmesmon
Mar 7, 2015
note that this is an edit of a previous RFC which removed quite a few methods from Write. The statement you're commenting was preserved from that one.
alexcrichton
reviewed
Mar 12, 2015
|
|
||
| * A convention on `into_inner` methods on composite writers and `BufStream` | ||
| is to flush the underlying writer before returning it. The deep flushing | ||
| may be undesirable if the consumer wants to continue writing. |
This comment has been minimized.
This comment has been minimized.
alexcrichton
Mar 12, 2015
Member
After taking another look at the implementations, I don't think that this "deep flushing" is happening (at least not in std::io), perhaps this was just a problem in old_io?
This comment has been minimized.
This comment has been minimized.
alexcrichton
self-assigned this
Mar 12, 2015
This comment has been minimized.
This comment has been minimized.
|
After thinking about this a bit today, I'm not quite sure that we may want the split. I agree that other abstractions may want a I feel like there may be a place for a generic |
This comment has been minimized.
This comment has been minimized.
|
cc @aturon |
This comment has been minimized.
This comment has been minimized.
|
I'm not sure what the use-case of a generic I also don't see what the benefit is of moving the declaration of In fact, the only benefit that comes to mind is a type that implements both |
This comment has been minimized.
This comment has been minimized.
There is actually a related issue of its own: |
This comment has been minimized.
This comment has been minimized.
|
I have filed issue rust-lang/rust#23386 to correct the documentation of |
mzabaluev commentedMar 6, 2015
No description provided.