This question is similar to this question asked about POSIX threads, but I would like to know what the answer is for boost::asio ip::tcp::socket:
- Can we call send from one thread and recv from another on the same socket?
In a C++11 application I'd like to share a tcp::socket such that one thread does blocking socket.read_some() and processes incoming data and another thread shares the same tcp::socket and only performs boost::asio::write() calls. Will this be thread-safe?