![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cJobThread.h>
Public Member Functions | |
| cJobThreadMgr (int iMaxThreads=32) | |
| ~cJobThreadMgr () | |
| HRESULT | ScheduleJob (cJobBase *pJob, TIMESYSD_t mSecDelay) |
| void | OnTickJobs () |
Public Member Functions inherited from GrayLib::cJobThreadSet< cJobThread > | |
| cJobThreadSet (int iMinThreads=0, int iMaxThreads=32) noexcept | |
| ITERATE_t | get_RunningJobQty () const noexcept |
| ITERATE_t | get_WaitingJobQty () const noexcept |
Friends | |
| class | cJobThread |
Additional Inherited Members | |
Protected Attributes inherited from GrayLib::cJobThreadSet< cJobThread > | |
| const int | m_iMinThreads |
| min Threads i should keep in a pool ready to go. TODO More... | |
| const int | m_iMaxThreads |
| max total Threads I'm allowed to use for this set. More... | |
| cArrayRef< cJobThread > | m_aRunningThreads |
| Active Threads currently running/sleeping on Jobs/scripts. Idle threads get returned back to the shared cJobThreadPool. More... | |
| cJobArray | m_WaitingJobs |
| cJobBase to schedule some TIME later. (not yet occupying a Thread.) More... | |
A set of jobs to be run concurrently (if possible), sharing a limited set of threads. m_iMaxThreads Jobs can run concurrently until done. hold threads to be re-used for new jobs.
| GrayLib::cJobThreadMgr::cJobThreadMgr | ( | int | iMaxThreads = 32 | ) |
| GrayLib::cJobThreadMgr::~cJobThreadMgr | ( | ) |
| void GrayLib::cJobThreadMgr::OnTickJobs | ( | ) |
Do we have any jobs waiting to run? Try to assign it to a free thread.
| HRESULT GrayLib::cJobThreadMgr::ScheduleJob | ( | cJobBase * | pJob, |
| TIMESYSD_t | mSecDelay | ||
| ) |
Schedule the job to run mSecDelay from now.
|
friend |