-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Don't fail in TcpStream.flush #9114
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
Conversation
cc @brson, @olsonjeffery |
Libuv doesn't appear to have a flush function for streams, so this should be okay: http://nikhilm.github.io/uvbook/filesystem.html#buffers-and-streams |
I'd believe that you don't need to flush, but I defer to those that have worked more in this area. |
I'm fairly sure that libuv doesn't have a notion of 'flush' at all, which makes me wonder whether flush() should be in Writer at all (maybe split it out to a FlushableWriter?). The relevant question here is should we fail for unimplemented behavior or just do nothing? Personally, I'd rather factor it out so it's not even possible to call unimplemented methods. I think I'm going to create a new issue to discuss this in general. We should probably wait on this PR until we have a consensus. |
I think the idea of having I was mainly concerned that if this were still I can also comment more on the specific issue, but this looks fine to me. |
See discussion on #9126. |
@alexcrichton @brson @sfackler I'm a bit concerned with this. When I flush something, I expect to be able to uncleanly terminate immediately and have everything written before the |
My interpretation is that calling flush guarantees that anything written
|
Oh, ok. If libuv doesn't require flushing to have it written then I have no On Sun, Sep 15, 2013 at 6:43 PM, Steven Fackler [email protected]:
|
Fix `undocumented_unsafe_blocks` in closures fixes rust-lang#9114 changelog: Fix `undocumented_unsafe_blocks` not checking for comments before the start of a closure
No description provided.