feat(util/interrupt): reset interrupt flag before throwing exception

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-11-21 15:31:09 -08:00
parent 8515821d56
commit ca74d069b9

View file

@ -23,8 +23,10 @@ bool interrupt_requested() {
}
void check_interrupted() {
if (interrupt_requested())
if (interrupt_requested()) {
reset_interrupt();
throw interrupted();
}
}
std::atomic_bool * interruptible_thread::get_flag_addr() {