23 Jul
2009
23 Jul
'09
11:11 p.m.
AMDG Timothy wrote:
I want to write a signal handler for SIGINT that notifies the main() thread to break out of a loop and exit. I was thinking of using Boost.Thread's interruption feature. Does it support this usage, or do I need to use some other way to do this?
It is currently only possible to interrupt a thread which was started with the boost::thread interface. This never includes the main thread. You can always use the same approach that boost::thread::interrupt uses: poll a flag and exit when the flag is set. In Christ, Steven Watanabe