详细描述
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
在文件Signal.h第47行定义。
所有成员的列表。
构造及析构函数文档
成员函数文档
| static bool cancel_computations |
( |
|
) |
[static] |
cancel computations
- 返回:
- if computations should be cancelled
在文件Signal.h第85行定义。
| void clear_cancel |
( |
|
) |
[static] |
| virtual const char* get_name |
( |
|
) |
const [virtual] |
| void handler |
( |
int |
signal |
) |
[static] |
| void set_cancel |
( |
bool |
immediately = false |
) |
[static] |
| bool set_handler |
( |
|
) |
[static] |
set handler
- 返回:
- if setting was successful
在文件Signal.cpp第66行定义。
| bool unset_handler |
( |
|
) |
[static] |
unset handler
- 返回:
- if unsetting was successful
在文件Signal.cpp第104行定义。
成员数据文档
bool active = false [static, read, protected] |
struct sigaction oldsigaction[NUMTRAPPEDSIGS] [static, protected] |
int signals = {SIGINT, SIGURG} [static, protected] |
该类的文档由以下文件生成: