Book: naming convention for loop functions
Open
documentation
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 339
- PR merge metrics
- No merged PRs in 30d
Description
There are quite a few functions in the book that runs `while` loop inside as are supposed to be called instead `task::spawn`. E.g. `server`, `client`, `client_writer`. I think it makes sense to extend those name to explicitly set expectation on loop inside it, like `server_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 be `connection_loop`? It makes disconnect handling easier to read.
Contributor guide
Assessment
This issue has not been assessed yet.