On Thu, May 12, 2011 at 12:52 AM, Igor R
I mean that ASIO documentation states explicitly: <<Thread Safety: Distinct objects: Safe. Shared objects: Unsafe>> http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/reference/ip__tcp/s...
This is "the standard answer", but in my opinion, it's not good enough. The revision history for asio version 1.4.0 states the following: "Synchronous read, write, accept and connect operations are now thread safe (meaning that it is now permitted to perform concurrent synchronous operations on an individual socket, if supported by the OS)." So clearly, the "Shared objects: Unsafe" does not tell the whole story. I also have yet to see an example where async_read/write's that could be could called simultaneously are surrounded by mutexes. It would be really nice to get a clear answer on whether these methods are thread safe or not.