MythTV  0.26-pre
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
MThreadPool Class Reference

#include <mthreadpool.h>

List of all members.

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 200 of file mthreadpool.cpp.

Referenced by globalInstance().

Definition at line 207 of file mthreadpool.cpp.


Member Function Documentation

Definition at line 232 of file mthreadpool.cpp.

Referenced by ~MThreadPool().

Definition at line 268 of file mthreadpool.cpp.

Referenced by MythCoreContextPrivate::~MythCoreContextPrivate().

Definition at line 279 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 335 of file mthreadpool.cpp.

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

Definition at line 442 of file mthreadpool.cpp.

Referenced by setExpiryTimeout().

Definition at line 448 of file mthreadpool.cpp.

Definition at line 454 of file mthreadpool.cpp.

Referenced by setMaxThreadCount().

Definition at line 460 of file mthreadpool.cpp.

Referenced by MainServer::MainServer().

Definition at line 466 of file mthreadpool.cpp.

bool MThreadPool::TryStartInternal ( QRunnable *  runnable,
QString  debugName,
bool  reserved 
) [private]

Definition at line 341 of file mthreadpool.cpp.

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

Definition at line 390 of file mthreadpool.cpp.

void MThreadPool::NotifyDone ( MPoolThread thread) [private]

Definition at line 432 of file mthreadpool.cpp.

Definition at line 487 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


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends