
"Arkadiy Vertleyb" <vertleyb@hotmail.com> wrote in message news:dnpe9q$vk6$1@sea.gmane.org...
Let me disagree with this. There are cases when having multiple threads, each working in a synchronous way, is a better approach. First, it's much more intuitive, and easier to debug. Second, sometimes it's the only way to achieve you goal, such as whan you can't (or don't want to) rewrite your processing algorithm in asynchronous way.
And when such a case arrives, it would be nice to have a clean socket class, without build-in asynchronisity.
Hold on a second... Where has this perception that asio implements synchronous operations on top of asynchronous come from?
From what I can see in docs and sources this does not seem to be the case. Notice that demuxer::run() is not called in the tutorial synchronous samples.
Synchronous operations are simply implemented as regular blocking socket calls. I think Chris was misinterpreted when he tried to justify constructing a socket with demuxer even if it is only used synchronously.