Hi George, george wrote:
At the moment I use the async_* functions and my threads are call the io_service::run() method. My application is thread-safe, for asio is there any detail I should take care when I call io_service:run() from many threads?
The io_service::run() function is designed to support being called from multiple threads, so you don't need to do anything special in that part of your application. However, if you call io_service::run() from multiple threads then it's possible for several of your callback handlers to be executed concurrently. If you have handlers that you do not want running concurrently (e.g. all handlers associated with a single connection object) you may want to look at using a strand: http://asio.sourceforge.net/boost_asio_0_3_7/libs/asio/doc/tutorial/tuttimer... Cheers, Chris