Boost logo

Boost Users :

Subject: Re: [Boost-users] [Thread] Interruption Feature
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-07-23 19:11:11


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


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