asio-tr2 icon indicating copy to clipboard operation
asio-tr2 copied to clipboard

Consider name of io_service class

Open chriskohlhoff opened this issue 10 years ago • 4 comments

chriskohlhoff avatar Feb 25 '15 10:02 chriskohlhoff

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 avatar Feb 25 '15 10:02 ja11sop

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

ja11sop avatar Feb 26 '15 13:02 ja11sop

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."

chriskohlhoff avatar May 05 '15 00:05 chriskohlhoff

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

cryptocode avatar Jan 13 '18 23:01 cryptocode