Boost logo

Boost :

Subject: [boost] thread interruption request
From: Gaetano Mendola (mendola_at_[hidden])
Date: 2016-04-10 10:24:06


Is there a way for an interruption point to not reset
the interruption request flag before throwing?

I have a Class accepting functions to be executed
asynchronously this is implemented in terms of
boost threads:

T::operator()() {
    while (true) {
        foo();
        boost::this_thread::interruption_point();
    }
}

One of those functions performs some operations
between a:

     try { /*code*/ } catch(...) { }

this basically makes my Class not interruptible indeed
that boost::this_thread::interruption_point() is useless
if a boost::thread_interrupted has been catched inside
the foo.

I have found this:
http://lists.boost.org/boost-users/2008/08/39106.php
where the guys needs a way to reset it, I need a way
to leave the flag on for the entire thread life if
an interruption has been requested.

Regards
Gaetano Mendola

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk