Boost logo

Boost Users :

Subject: Re: [Boost-users] [ASIO] Thread safety of socket.write_some & socket.read_some
From: James12 (james791d_at_[hidden])
Date: 2008-10-29 10:36:21


Igor R wrote:
>
>
>> Accessing the same socket object from different threads is unsafe:
>
>> http://www.boost.org/doc/libs/1_36_0/doc/html/boost_asio/reference/ip__tcp/socket.html
>> "Thread Safety
>> Distinct objects: Safe.
>> Shared objects: Unsafe. "
>

Hi Igor and thanks for your reply.

I am sorry for not reading the documentation well enough :-)

Does this mean that I can still use the socket object from different threads
if I use some kind of locking method to make sure that only one thread at a
time uses the socket?

Thanks,
James

-- 
View this message in context: http://www.nabble.com/-ASIO--Thread-safety-of-socket.write_some---socket.read_some-tp20222810p20228436.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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