template<
class F,
class T>
class TMPWorkerExecutor< F, T, void >
Definition at line 169 of file TMPWorkerExecutor.h.
|
| std::vector< T > | fArgs |
| | a vector containing the arguments that must be passed to fFunc
|
| |
| F | fFunc |
| | the function to be executed
|
| |
| unsigned | fNWorker |
| | the ordinal number of this worker (0 to nWorkers-1)
|
| |
| pid_t | fPid |
| | the PID of the process in which this worker is running
|
| |
| std::unique_ptr< TSocket > | fS |
| | This worker's socket. The unique_ptr makes sure resources are released.
|
| |
#include <TMPWorkerExecutor.h>
◆ TMPWorkerExecutor()
◆ ~TMPWorkerExecutor()
◆ GetNWorker()
| unsigned TMPWorker::GetNWorker |
( |
| ) |
const |
|
inlineinherited |
◆ GetPid()
| pid_t TMPWorker::GetPid |
( |
| ) |
|
|
inlineinherited |
◆ GetSocket()
◆ HandleInput()
◆ Init()
| void TMPWorker::Init |
( |
int | fd, |
|
|
unsigned | workerN ) |
|
virtualinherited |
This method is called by children processes right after forking.
Initialization of worker properties that must be delayed until after forking must be done here.
For example, Init saves the pid into fPid, and adds the TMPWorker to the main eventloop (as a TFileHandler).
Make sure this operations are performed also by overriding implementations, e.g. by calling TMPWorker::Init explicitly.
Definition at line 52 of file TMPWorker.cxx.
◆ Run()
◆ SendError()
◆ fArgs
a vector containing the arguments that must be passed to fFunc
Definition at line 189 of file TMPWorkerExecutor.h.
◆ fFunc
◆ fId
| std::string TMPWorker::fId |
|
protectedinherited |
identifier string in the form W<nwrk>|P<proc id>
Definition at line 44 of file TMPWorker.h.
◆ fMaxNEntries
the maximum number of entries to be processed by this worker
Definition at line 46 of file TMPWorker.h.
◆ fNWorker
| unsigned TMPWorker::fNWorker |
|
privateinherited |
the ordinal number of this worker (0 to nWorkers-1)
Definition at line 56 of file TMPWorker.h.
◆ fNWorkers
| unsigned TMPWorker::fNWorkers |
|
protectedinherited |
the number of workers spawned
Definition at line 45 of file TMPWorker.h.
◆ fPid
the PID of the process in which this worker is running
Definition at line 55 of file TMPWorker.h.
◆ fProcessedEntries
the number of entries processed by this worker so far
Definition at line 47 of file TMPWorker.h.
◆ fS
| std::unique_ptr<TSocket> TMPWorker::fS |
|
privateinherited |
This worker's socket. The unique_ptr makes sure resources are released.
Definition at line 54 of file TMPWorker.h.
The documentation for this class was generated from the following file: