|
Boost Users : |
Subject: Re: [Boost-users] [ASIO] Thread safety of socket.write_some & socket.read_some
From: Igor R (boost.lists_at_[hidden])
Date: 2008-11-04 10:04:36
> That's great news. The only unsolved problem now is how to safely stop the
> synchronous read operation from another thread when I want to close the
> socket since close() or shutdown() do not seem to be thread safe yet (and as
> far as I know, cancel() can't be used on Windows XP).
>
>From my experience, it's worth getting used to the asynchronous i/o.
It's much more flexible (in case you need cancellations, timeouts
etc.), and with asio it is also quite convenient and simple. Besides,
using the asynchronous paradigm might make some of i/o threading (and
locking) unnecessary, thus simplifying the overall design.
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