xrootd
|
A synchronized queue. More...
#include <XrdClJobManager.hh>
Classes | |
struct | JobHelper |
Public Member Functions | |
JobManager (uint32_t workers) | |
Constructor. More... | |
~JobManager () | |
Destructor. More... | |
bool | Initialize () |
Initialize the job manager. More... | |
bool | Finalize () |
Finalize the job manager, clear the queues. More... | |
bool | Start () |
Start the workers. More... | |
bool | Stop () |
Stop the workers. More... | |
void | QueueJob (Job *job, void *arg=0) |
Add a job to be run. More... | |
void | RunJobs () |
Run the jobs. More... | |
bool | IsWorker () |
Private Member Functions | |
void | StopWorkers (uint32_t n) |
Stop all workers up to n'th. More... | |
Private Attributes | |
std::vector< pthread_t > | pWorkers |
SyncQueue< JobHelper > | pJobs |
XrdSysMutex | pMutex |
bool | pRunning |
A synchronized queue.
|
inline |
|
inline |
Destructor.
bool XrdCl::JobManager::Finalize | ( | ) |
Finalize the job manager, clear the queues.
Referenced by XrdEc::ThreadPool::~ThreadPool().
bool XrdCl::JobManager::Initialize | ( | ) |
Initialize the job manager.
Referenced by XrdEc::ThreadPool::ThreadPool().
|
inline |
References pWorkers.
Referenced by XrdCl::ZipArchive::Schedule().
|
inline |
Add a job to be run.
References pJobs.
Referenced by XrdEc::ThreadPool::Execute(), XrdCl::ZipArchive::Schedule(), and XrdCl::ParallelOperation< HasHndl >::Schedule().
void XrdCl::JobManager::RunJobs | ( | ) |
Run the jobs.
bool XrdCl::JobManager::Start | ( | ) |
Start the workers.
Referenced by XrdEc::ThreadPool::ThreadPool().
bool XrdCl::JobManager::Stop | ( | ) |
Stop the workers.
Referenced by XrdEc::ThreadPool::~ThreadPool().
|
private |
Stop all workers up to n'th.
Referenced by QueueJob().
|
private |
|
private |
Referenced by JobManager().
|
private |
Referenced by IsWorker(), and JobManager().