feat(util/interrupt): reset interrupt flag before throwing exception
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
8515821d56
commit
ca74d069b9
1 changed files with 3 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue