![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cJobFiber.h>
Public Member Functions | |
| cJobFiberMgr (int iMaxFibers=32) | |
| ~cJobFiberMgr () | |
| HRESULT | ScheduleJob (cJobBase *pJob, TIMESYSD_t mSecDelay) |
| void | OnTickJobs (TIMESYSD_t mSec) |
Public Member Functions inherited from GrayLib::cJobThreadSet< cJobFiber > | |
| cJobThreadSet (int iMinThreads=0, int iMaxThreads=32) noexcept | |
| ITERATE_t | get_RunningJobQty () const noexcept |
| ITERATE_t | get_WaitingJobQty () const noexcept |
Friends | |
| class | cJobFiber |
Additional Inherited Members | |
Protected Attributes inherited from GrayLib::cJobThreadSet< cJobFiber > | |
| 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< cJobFiber > | 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... | |
for running a set of jobs on a limited set of fibers/threads from cJobFibersFree. NOT concurrent jobs. these are time sliced fibers on the current thread. Has a limited pool of active fibers/threads being used by my batch of jobs.
| GrayLib::cJobFiberMgr::cJobFiberMgr | ( | int | iMaxFibers = 32 | ) |
| GrayLib::cJobFiberMgr::~cJobFiberMgr | ( | ) |
| void GrayLib::cJobFiberMgr::OnTickJobs | ( | TIMESYSD_t | mSec | ) |
Allow the jobs (threads) to run for n mSecRun (or less) then yield. Assume this is only called on one thread.
| HRESULT GrayLib::cJobFiberMgr::ScheduleJob | ( | cJobBase * | pJob, |
| TIMESYSD_t | mSecDelay | ||
| ) |
Schedule the job to run mSecDelay from now.
|
friend |