On Fri, Nov 13, 2009 at 8:22 AM, victor <victor.boost.program@gmail.com> wrote:
Hi,All
    io_service_.run() in itself thread. I initial socket with it , like "socket_(io_service_)" . Then I read data from this socket in io_service thread.
    Now if i want call "async_write " to this socket in another thread, do I must use "io_service_.post( boost::bind function which call async_write)", or can I call async_write directly?
    And if i want close this socket, do I must use "io_service_.post(..)" , or can I use "socket_.close()" directly in another thread?
 
 
   thanks
  
 

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

You may call the methods directly from another thread.

--
Matheus Araújo Aguiar
Computer Scientist
matheus.pit@gmail.com