|
commore
1.0.6-SNAPSHOT
|
#include <Processor.h>
Classes | |
| struct | HImpl |
Public Member Functions | |
| Processor (const char *name, const int nb_max_thread, int min_thread) | |
| Processor (const int nb_max_thread, int min_thread) | |
| ~Processor () | |
| Processor (const Processor &) | |
| Processor & | operator= (const Processor &) |
| bool | start (const char *name, int min_thread=0, int max_thread=64) |
| bool | submit (const PAction &action) |
| bool | submit (ActionGroup &actions) |
| bool | submit (ProcessFunction f, void *p) |
| void | remove_from_submitted_action (const PAction &action) |
| void | pause () |
| void | resume () |
| bool | stop () |
| void | abort () |
| const AString & | get_name () const |
| bool | waitAction (const PAction &action, const int nTimeOut_ms=0) |
| void | waitIdle () |
| void | terminate () |
Static Public Member Functions | |
| static Processor & | getDefaultProcessor () |
Processor implement a thread pool to execute actions
| Processor::Processor | ( | const char * | name, |
| const int | nb_max_thread, | ||
| int | min_thread | ||
| ) |
| nb_max_thread | maximal number of thread of the processor. 0 means it will have no limit. |
| min_trhead | number min of thread in processor |
| Processor::Processor | ( | const int | nb_max_thread, |
| int | min_thread | ||
| ) |
| Processor::~Processor | ( | ) |
| Processor::Processor | ( | const Processor & | p | ) |
| void Processor::abort | ( | ) |
Send an abort request to all actions and empties the waiting action list
| const AString & Processor::get_name | ( | ) | const |
|
static |
| void Processor::pause | ( | ) |
Pause the processor wich will no longer run new actions, running action will continue normally
| void Processor::remove_from_submitted_action | ( | const PAction & | action | ) |
Unsubmit an action (before it was executed)
| action | action to remove |
| void Processor::resume | ( | ) |
Resume the processor
| bool Processor::start | ( | const char * | name, |
| int | min_thread = 0, |
||
| int | max_thread = 64 |
||
| ) |
Start processor
| max_thread | number max of thread in processor |
| min_trhead | number min of thread in processor |
| bool Processor::stop | ( | ) |
Send a stop request to all actions and empties the waiting action list
| bool Processor::submit | ( | const PAction & | action | ) |
Submit an action to a processor
| action | action to run |
| bool Processor::submit | ( | ActionGroup & | actions | ) |
Submit a group of action to a processor
| actions | group of actions |
| bool Processor::submit | ( | ProcessFunction | f, |
| void * | p | ||
| ) |
Submit a function
| f | function to execute |
| p | function argument |
| void Processor::terminate | ( | ) |
Free the processor's thread
| bool Processor::waitAction | ( | const PAction & | action, |
| const int | nTimeOut_ms = 0 |
||
| ) |
| void Processor::waitIdle | ( | ) |