Free Electron
Public Member Functions | Protected Attributes | Private Attributes | List of all members
fe::ext::JobQueue< T > Class Template Reference

Queue of tasks. More...

#include <JobQueue.h>

Inheritance diagram for fe::ext::JobQueue< T >:
Inheritance graph
[legend]

Public Member Functions

U32 workers (void) const
 
void post (T job)
 
void post (T first_job, T last_job)
 
BWORD take (T &job)
 
void waitForJob (T &job)
 
void deliver (T job)
 
BWORD acceptDelivery (T &job)
 
void waitForDelivery (T &job)
 
BWORD synchronize (BWORD a_supervised=FALSE)
 waits until all threads call sync More...
 
void relayException (const Exception &a_rException)
 
void resolveException (void)
 
- Public Member Functions inherited from fe::Handled< JobQueue< T > >
const hp< JobQueue< T > > & getHandle (void) const
 Get a safe handle to this object. More...
 
- Public Member Functions inherited from fe::Protectable
virtual I32 protection (void) const
 
virtual void protect (void)
 
virtual void unprotect (void)
 
virtual Protectableclone (Protectable *pInstance=NULL)
 
- Public Member Functions inherited from fe::Counted
virtual void acquire (void)
 Increment the reference count. More...
 
virtual void acquire (int &rCount)
 Increment the reference count (and get the count) More...
 
virtual void release (void)
 Decrement the reference count. More...
 
virtual void abandon (void)
 Decrement the reference count. More...
 
int count (void) const
 Return the count of references. More...
 
void setName (const String &)
 
void trackReference (void *pReference, String what)
 
void untrackReference (void *pReference)
 
void registerRegion (void *pT, U32 bytes)
 

Protected Attributes

U32 m_workers
 

Private Attributes

RecursiveMutex m_jobMonitor
 
RecursiveMutex m_workerMonitor
 
RecursiveMutex::Condition m_jobAvailable
 
RecursiveMutex::Condition m_workerDelivered
 
std::queue< T > m_posted
 
std::queue< T > m_delivered
 
RecursiveMutex m_barrierMonitor
 
RecursiveMutex::Condition m_barrierHit
 
U32 m_barrierCount
 
U32 m_barrierMet
 
Exceptionm_pException
 

Additional Inherited Members

- Static Public Member Functions inherited from fe::Counted
static String reportTracker (void)
 
static U32 trackerCount (void)
 
- Protected Member Functions inherited from fe::Handled< JobQueue< T > >
void abandonHandle (void)
 
- Protected Member Functions inherited from fe::Counted
int releaseInternal (void)
 Decrement the reference count. More...
 
void suppressReport (void)
 

Detailed Description

template<typename T>
class fe::ext::JobQueue< T >

Queue of tasks.

Member Function Documentation

◆ synchronize()

template<typename T>
BWORD fe::ext::JobQueue< T >::synchronize ( BWORD  a_supervised = FALSE)
inline

waits until all threads call sync

Returns true to exactly one of the threads.


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