Boost logo

Boost Users :

Subject: Re: [Boost-users] [Asio]About aync_write and socket.close()
From: Matheus Araújo Aguiar (matheus.pit_at_[hidden])
Date: 2009-11-13 14:41:00


On Fri, Nov 13, 2009 at 8:22 AM, victor <victor.boost.program_at_[hidden]>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_at_[hidden]
> 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_at_[hidden]


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net