chriskohlhoff / asio-tr2

C++ TR2 proposal based on Asio
17 stars 5 forks source link

Consider name of io_service class #62

Open chriskohlhoff opened 9 years ago

ja11sop commented 9 years ago

Note to say that Detlef made the remark that he would actually prefer the term service to change. This may be worth exploring also.

ja11sop commented 9 years ago

Just a comment to say the obvious alternative names are io_execution_context and io_context

chriskohlhoff commented 9 years ago

Pre-Lenexa Summary

[io_service.io_service]

The name io_service was chosen, after much discussion, during the Boost review of Asio:

http://lists.boost.org/Archives/boost/2005/12/98592.php

Prior to that it was called demuxer. Other names considered include io_driver, io_services, io_broker, io_system and so on.

If there was to be a change, my vote would go to io_context. I find it sits comfortably in design discussion, such as:

"All connections in the server run in the same io_context."

"This program creates each socket in a unique io_context."

"My server creates a single-threaded io_context for each CPU. The io_context for the next connection is determined in a round-robin manner."

"An io_context provides a link between the networking API objects (such as sockets and timers) and the operating system facilities that implement them. By default, completion handlers for asynchronous operations execute in the io_context; this can be overridden on a per-operation basis, but the io_context is the earliest point at which the event notification can be received."

cryptocode commented 6 years ago

@chriskohlhoff io_context is the new name in boost 1.66. Is io_service deprecated and the typedef scheduled for removal?