NCBI C++ ToolKit
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
CAsyncTaskProcessor< TTask >::CContext Class Reference

Search Toolkit Book for CAsyncTaskProcessor::CContext

+ Collaboration diagram for CAsyncTaskProcessor< TTask >::CContext:

Public Member Functions

 CContext (int s, int m)
 
bool Enabled () const
 
bool SchedulerImpl (TTask)
 
void ExecutorImpl ()
 
void ExecutorImplStop ()
 

Private Types

typedef list< pair< int, TTask > > TTasks
 
typedef TTasks::iterator TTasks_I
 

Private Member Functions

bool FillBacklog (TTasks_I &)
 

Private Attributes

CMutex lock
 
CConditionVariable cond
 
TTasks tasks
 
TTasks backlog
 
const unsigned sleep
 
const int max_attempts
 
bool stop
 

Detailed Description

template<class TTask>
class CAsyncTaskProcessor< TTask >::CContext

Definition at line 45 of file async_task.hpp.

Member Typedef Documentation

◆ TTasks

template<class TTask >
typedef list<pair<int, TTask> > CAsyncTaskProcessor< TTask >::CContext::TTasks
private

Definition at line 67 of file async_task.hpp.

◆ TTasks_I

template<class TTask >
typedef TTasks::iterator CAsyncTaskProcessor< TTask >::CContext::TTasks_I
private

Definition at line 68 of file async_task.hpp.

Constructor & Destructor Documentation

◆ CContext()

template<class TTask >
CAsyncTaskProcessor< TTask >::CContext::CContext ( int  s,
int  m 
)
inline

Definition at line 48 of file async_task.hpp.

Member Function Documentation

◆ Enabled()

template<class TTask >
bool CAsyncTaskProcessor< TTask >::CContext::Enabled ( ) const
inline

◆ ExecutorImpl()

template<class TTask >
void CAsyncTaskProcessor< TTask >::CContext::ExecutorImpl
inline

◆ ExecutorImplStop()

template<class TTask >
void CAsyncTaskProcessor< TTask >::CContext::ExecutorImplStop ( )
inline

◆ FillBacklog()

template<class TTask >
bool CAsyncTaskProcessor< TTask >::CContext::FillBacklog ( TTasks_I backlog_end)
inlineprivate

Definition at line 192 of file async_task.hpp.

◆ SchedulerImpl()

template<class TTask >
bool CAsyncTaskProcessor< TTask >::CContext::SchedulerImpl ( TTask  task)
inline

Member Data Documentation

◆ backlog

template<class TTask >
TTasks CAsyncTaskProcessor< TTask >::CContext::backlog
private

Definition at line 75 of file async_task.hpp.

◆ cond

template<class TTask >
CConditionVariable CAsyncTaskProcessor< TTask >::CContext::cond
private

◆ lock

template<class TTask >
CMutex CAsyncTaskProcessor< TTask >::CContext::lock
private

◆ max_attempts

template<class TTask >
const int CAsyncTaskProcessor< TTask >::CContext::max_attempts
private

◆ sleep

template<class TTask >
const unsigned CAsyncTaskProcessor< TTask >::CContext::sleep
private

Definition at line 76 of file async_task.hpp.

◆ stop

template<class TTask >
bool CAsyncTaskProcessor< TTask >::CContext::stop
private

◆ tasks

template<class TTask >
TTasks CAsyncTaskProcessor< TTask >::CContext::tasks
private

The documentation for this class was generated from the following file:
Modified on Sun Apr 21 03:39:59 2024 by modify_doxy.py rev. 669887