MythTV  0.27pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
MThreadPool Class Reference

#include <mthreadpool.h>

Collaboration diagram for MThreadPool:
Collaboration graph
[legend]

Public Member Functions

 MThreadPool (const QString &name)
 ~MThreadPool ()
void Stop (void)
void DeletePoolThreads (void)
void start (QRunnable *runnable, QString debugName, int priority=0)
bool tryStart (QRunnable *runnable, QString debugName)
void startReserved (QRunnable *runnable, QString debugName, int waitForAvailMS=0)
int expiryTimeout (void) const
void setExpiryTimeout (int expiryTimeout)
int maxThreadCount (void) const
void setMaxThreadCount (int maxThreadCount)
int activeThreadCount (void) const
void waitForDone (void)

Static Public Member Functions

static MThreadPoolglobalInstance (void)
static void StopAllPools (void)
static void ShutdownAllPools (void)

Private Member Functions

bool TryStartInternal (QRunnable *, QString, bool)
void NotifyAvailable (MPoolThread *)
void NotifyDone (MPoolThread *)
void ReleaseThread (void)

Private Attributes

MThreadPoolPrivatem_priv

Friends

class MPoolThread

Detailed Description

Definition at line 14 of file mthreadpool.h.

Constructor & Destructor Documentation

MThreadPool::MThreadPool ( const QString &  name)

Definition at line 201 of file mthreadpool.cpp.

Referenced by globalInstance().

MThreadPool::~MThreadPool ( )

Definition at line 208 of file mthreadpool.cpp.

Member Function Documentation

void MThreadPool::Stop ( void  )
void MThreadPool::DeletePoolThreads ( void  )

Definition at line 233 of file mthreadpool.cpp.

Referenced by ~MThreadPool().

MThreadPool * MThreadPool::globalInstance ( void  )
static
void MThreadPool::StopAllPools ( void  )
static

Definition at line 269 of file mthreadpool.cpp.

Referenced by MythCoreContextPrivate::~MythCoreContextPrivate().

void MThreadPool::ShutdownAllPools ( void  )
static

Definition at line 280 of file mthreadpool.cpp.

Referenced by MythCoreContextPrivate::~MythCoreContextPrivate().

void MThreadPool::start ( QRunnable *  runnable,
QString  debugName,
int  priority = 0 
)
bool MThreadPool::tryStart ( QRunnable *  runnable,
QString  debugName 
)

Definition at line 336 of file mthreadpool.cpp.

void MThreadPool::startReserved ( QRunnable *  runnable,
QString  debugName,
int  waitForAvailMS = 0 
)
int MThreadPool::expiryTimeout ( void  ) const

Definition at line 443 of file mthreadpool.cpp.

Referenced by setExpiryTimeout().

void MThreadPool::setExpiryTimeout ( int  expiryTimeout)

Definition at line 449 of file mthreadpool.cpp.

int MThreadPool::maxThreadCount ( void  ) const

Definition at line 455 of file mthreadpool.cpp.

Referenced by setMaxThreadCount().

void MThreadPool::setMaxThreadCount ( int  maxThreadCount)

Definition at line 461 of file mthreadpool.cpp.

Referenced by MainServer::MainServer().

int MThreadPool::activeThreadCount ( void  ) const

Definition at line 467 of file mthreadpool.cpp.

void MThreadPool::waitForDone ( void  )
bool MThreadPool::TryStartInternal ( QRunnable *  runnable,
QString  debugName,
bool  reserved 
)
private

Definition at line 342 of file mthreadpool.cpp.

Referenced by NotifyAvailable(), start(), startReserved(), and tryStart().

void MThreadPool::NotifyAvailable ( MPoolThread thread)
private

Definition at line 391 of file mthreadpool.cpp.

void MThreadPool::NotifyDone ( MPoolThread thread)
private

Definition at line 433 of file mthreadpool.cpp.

void MThreadPool::ReleaseThread ( void  )
private

Definition at line 488 of file mthreadpool.cpp.

Friends And Related Function Documentation

friend class MPoolThread
friend

Definition at line 16 of file mthreadpool.h.

Referenced by TryStartInternal().

Member Data Documentation

MThreadPoolPrivate* MThreadPool::m_priv
private

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