16 #ifndef DISABLE_CANCEL_CALLBACK
29 #define NUMTRAPPEDSIGS 2
59 static void handler(
int signal);
80 static void set_cancel(
bool immediately=
false);
88 #ifndef DISABLE_CANCEL_CALLBACK
99 virtual const char*
get_name()
const {
return "Signal"; }
119 #endif // __SIGNAL__H_
static bool set_handler()
Class ShogunException defines an exception which is thrown whenever an error inside of shogun occurs...
virtual const char * get_name() const
Class SGObject is the base class of all shogun objects.
static bool cancel_computation
static void clear_cancel()
static bool unset_handler()
void(* sg_cancel_computations)(bool &delayed, bool &immediately)
function called to cancel things
static bool cancel_computations()
static void handler(int signal)
static int signals[NUMTRAPPEDSIGS]
all of classes and functions are contained in the shogun namespace
Class Signal implements signal handling to e.g. allow ctrl+c to cancel a long running process...
static struct sigaction oldsigaction[NUMTRAPPEDSIGS]
static void set_cancel(bool immediately=false)
static bool cancel_immediately