|
Boost Users : |
From: Matthias Vallentin (vallentin_at_[hidden])
Date: 2008-06-18 02:55:08
On Tue, Jun 17, 2008 at 10:49:58AM -0400, Reynolds, John wrote:
> I believe that only certain boost thread methods such as sleep can be
> interrupted.
That summarizes pretty much my misunderstanding. In essence I did not
realize that only the methods outlined by Anthony are interruptable via
interrupt().
> What you could do is a loop that calls select with a
> timeout and only call a blocking accept when there is socket activity
> or you could loop with a non-blocking accept.
> I assume that asio does this much better than what I have described.
Migrating to the non-blocking versions will probably do the trick. It
seems to be a reasonable thing to leverage boost::asio for this purpose.
Thanks for your help,
Matthias
(dhruva: I will probably resort to boost::asio although the Samba tricks
are indeed quite elegant.)
-- Matthias Vallentin vallentin_at_[hidden] pgp/gpg: 0x37F34C16
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