CSignal Class Reference
Detailed Description
Class Signal implements signal handling to e.g. allow ctrl+c to cancel a long running process.
This is done in two ways:
- A signal handler is attached to trap the SIGINT and SIGURG signal. Pressing ctrl+c or sending the SIGINT (kill ...) signal to the shogun process will make shogun print a message asking to immediately exit the running method and to fall back to the command line.
- When an URG signal is received or ctrl+c P is pressed shogun will prematurely stop a method and continue execution. For example when an SVM solver takes a long time without progressing much, one might still be interested in the result and should thus send SIGURG or interactively prematurely stop the method
Definition at line 42 of file Signal.h.
List of all members.
Constructor & Destructor Documentation
default constructor
Definition at line 28 of file Signal.cpp.
CSignal::~CSignal |
( |
|
) |
[virtual] |
Member Function Documentation
static bool CSignal::cancel_computations |
( |
|
) |
[static] |
cancel computations
- Returns:
- if computations should be cancelled
Definition at line 80 of file Signal.h.
void CSignal::clear |
( |
|
) |
[static] |
void CSignal::clear_cancel |
( |
|
) |
[static] |
clear cancel flag signals
Definition at line 126 of file Signal.cpp.
virtual const char* CSignal::get_name |
( |
|
) |
[virtual] |
- Returns:
- object name
Definition at line 93 of file Signal.h.
void CSignal::handler |
( |
int |
signal |
) |
[static] |
handler
- Parameters:
-
Definition at line 39 of file Signal.cpp.
void CSignal::set_cancel |
( |
bool |
immediately = false |
) |
[static] |
set cancel flag signals
Definition at line 132 of file Signal.cpp.
bool CSignal::set_handler |
( |
|
) |
[static] |
set handler
- Returns:
- if setting was successful
Definition at line 64 of file Signal.cpp.
bool CSignal::unset_handler |
( |
|
) |
[static] |
unset handler
- Returns:
- if unsetting was successful
Definition at line 102 of file Signal.cpp.
Member Data Documentation
if computation should be cancelled
Definition at line 106 of file Signal.h.
if shogun should return ASAP
Definition at line 109 of file Signal.h.
signal actions
Definition at line 100 of file Signal.h.
signals; handling external lib
Definition at line 97 of file Signal.h.
The documentation for this class was generated from the following files: