Skip to content

Book: naming convention for loop functions #106

Open
@kachayev

Description

@kachayev

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.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions