Nathaniel J Fries wrote
Also, the main point of asynchronous I/O is that you don't need a thread-per-file/connection to achieve necessary performance. A typical asynchronous I/O server will have either 1 or #processors dedicated I/O threads and use a fixed number of worker threads for non-IO tasks, not a thread-per-connection. I would suggest that this renders your benchmark questionable even after you make my suggested change.
Yes, I don't intend to create one thread per connection in asynchronous case. Just for this sample use case I created a thread on connection request and used it to generate messages. My main concern is, if we are trying to send messages asynchronously (in non-ioservice thread) then the performance is significantly bad compare to sending the messages synchronously in the connection thread (of course if more and more number of clients get added then thread-per-connection in synchronous case won't scale well). -- View this message in context: http://boost.2283326.n4.nabble.com/boost-asio-synchronous-vs-asynchronous-op... Sent from the Boost - Users mailing list archive at Nabble.com.