Skip to content
This repository has been archived by the owner on May 6, 2018. It is now read-only.

Rename AsyncWrite::shutdown #80

Closed
carllerche opened this issue Nov 7, 2017 · 3 comments
Closed

Rename AsyncWrite::shutdown #80

carllerche opened this issue Nov 7, 2017 · 3 comments
Milestone

Comments

@carllerche
Copy link
Member

carllerche commented Nov 7, 2017

Because this function is unrelated to TCP shutdown (and the AsyncWrite::shutdown impl for TcpStream does not call shutdown), the name of the function is very confusing.

A couple of options:

  • finalize
  • prepare_for_close
  • poll_close_ready
  • start_close

Related: #73.

@carllerche carllerche added this to the v0.2 - Initial Release milestone Nov 7, 2017
@P-E-Meunier
Copy link

Cool. Why is shutdown for TcpStream not calling TCP shutdown?
Other than this, I'd vote for poll_close (why the _ready?). I find start_close confusing, given that one is expected to call it until it returns Async::Ready.

@carllerche
Copy link
Member Author

@P-E-Meunier Because "AsyncWrite::shutdown" and TCP shutdown are two completely separate functions with different behaviors.

This is why AsyncWrite::shutdown needs to be renamed.

@carllerche
Copy link
Member Author

The tokio-io crate has been moved into the tokio git repo.

I created a new issue over there. See link above.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants