virtual bool want_interrupt() = 0
inline virtual ~InterruptCallback()
Public Static Functions
static void clear_instance()
static void check()
an interrupt callback is set
the callback returns true if this is the case, then throw an exception. Should not be called from multiple threads.
static bool is_interrupted()
same as check() but return true if is interrupted instead of throwing. Can be called from multiple threads.
static size_t get_period_hint(size_t flops)
assuming each iteration takes a certain number of flops, what is a reasonable interval to check for interrupts?
- virtual bool want_interrupt() = 0