From: Carlo Wood (carlo_at_[hidden])
Date: 2006-05-09 19:52:51
On Tue, May 09, 2006 at 10:23:53PM +0000, Ryan Gallagher wrote:
> I do like being able to write:
> bind(&database_test_monitor::handle_interruption_and_exit, cref(*this), _1));
My ramblings on signals are on http://libcw.sourceforge.net/kernel/signals.html
Did you read the first paragraph of that (2.1)?
What I try to say there is that you can't expect to DO anything when a
signal occurs. At most you can increment an atomic counter, and that's it.
So, if you want an interface that allows call-backs (which I assume
&database_test_monitor::handle_interruption_and_exit is), then that
needs to be called later, when the application returns to the main loop.
As a result, you can't think about making a (portable) interface for
signals unless you provide that main loop - and that means, include
timing and I/O for files, sockets, pipes etc (which is what libcw is).
Anything simpler will make no sense imho.
-- Carlo Wood <carlo_at_[hidden]>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk