-
Notifications
You must be signed in to change notification settings - Fork 341
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
Book: naming convention for loop functions #106
Labels
documentation
Improvements or additions to documentation
Comments
We spoke about his after the course and I agree, I think calling the functions |
+1 I'd think for server a more specif |
@kachayev are you still willing to provide a pull request? ;) |
@matklad Absolutely! ;) Will submit PR shortly. |
@kachayev please also submit one to async-rs/a-chat, it's the reference implementation. |
bors bot
added a commit
to async-rs/a-chat
that referenced
this issue
Sep 2, 2019
7: Rename server functions to follow *_loop convention r=matklad a=kachayev Described here: async-rs/async-std#106 If new names sound okay, I would submit PR for the book. Co-authored-by: Oleksii Kachaiev <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are quite a few functions in the book that runs
while
loop inside as are supposed to be called insteadtask::spawn
. E.g.server
,client
,client_writer
. I think it makes sense to extend those name to explicitly set expectation on loop inside it, likeserver_loop
,client_loop
,client_writer_loop
. Would be happy to provide PR if that sounds like a helpful change.Another thought about naming,
client
function technically is not about "client", it's about "connection". Maybe it should beconnection_loop
? It makes disconnect handling easier to read.The text was updated successfully, but these errors were encountered: