|
Boost : |
Subject: Re: [boost] New Version (0.4) of Boost.Application (Aspect Based) available to comments (RFC).
From: Stanislav Ivochkin (isn_at_[hidden])
Date: 2013-11-08 07:55:37
2013/11/8 Renato Forti <re.tf_at_[hidden]>
> The user need use 'select' to use this aspect? How user will use it? (on
> final application code)
The aspect exposes a raw file descriptor in it's public interface
selfpipe::readfd() and this descriptor can be passed into some I/O
processing library. For example, one can assign native file descriptor to
boost::asio::posix::stream_descriptor to use selfpipe with boost::asio.
Also one can add this file descriptor to libevent's set of monitored
descriptors. And of course, this file descriptor can be passed into direct
select/poll calls.
selfpipe::poke() interface can be called both explicitly and implicitly. In
must be called implicitly on app's termination to allow I/O threads
terminate gracefully. Explicit call may be useful when handling
non-termination signals. For instance, configuration reload without
restarting application is often done using user signals. Switching database
backend without dropping active connections is a good aim, isn't it? :)
We have something like that in Windows side?
AFAIK, no. Nevertheless, I think even POSIX-only selfpipe aspect will be
useful.
-- Regards, Stas.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk