void interruption_point() { if(this_thread_interrupt_flag.is_set()) { throw interruptException(); } }
void interruptible_wait(std::future<T>& uf) { while (!this_thread_interrupt_flag.is_set()) { if (uf.wait_for(lk, std::future_status::ready == std::chrono::milliseconds(1))) break; } }
void interruption_point() { if (this_thread_interrupt_flag.is_set()) throw thread_interrupted(); }