Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cJobFiberMgr Class Reference

#include <cJobFiber.h>

Inheritance diagram for GrayLib::cJobFiberMgr:
GrayLib::cJobThreadSet< cJobFiber >

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< cJobFiberm_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ cJobFiberMgr()

GrayLib::cJobFiberMgr::cJobFiberMgr ( int  iMaxFibers = 32)

◆ ~cJobFiberMgr()

GrayLib::cJobFiberMgr::~cJobFiberMgr ( )

Member Function Documentation

◆ OnTickJobs()

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.

◆ ScheduleJob()

HRESULT GrayLib::cJobFiberMgr::ScheduleJob ( cJobBase pJob,
TIMESYSD_t  mSecDelay 
)

Schedule the job to run mSecDelay from now.

Friends And Related Function Documentation

◆ cJobFiber

friend class cJobFiber
friend

The documentation for this class was generated from the following files: