LibreOffice Module cppu (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cppu_threadpool::ThreadPool Class Reference

#include <threadpool.hxx>

Inheritance diagram for cppu_threadpool::ThreadPool:
[legend]
Collaboration diagram for cppu_threadpool::ThreadPool:
[legend]

Public Member Functions

 ThreadPool ()
 
virtual ~ThreadPool () override
 
void dispose (void const *nDisposeId)
 
void destroy (void const *nDisposeId)
 
bool addJob (const ::rtl::ByteSequence &aThreadId, bool bAsynchron, void *pThreadSpecificData, RequestFun *doRequest, void const *disposeId)
 
void prepare (const ::rtl::ByteSequence &aThreadId)
 
void * enter (const ::rtl::ByteSequence &aThreadId, void const *nDisposeId)
 
bool revokeQueue (const ::rtl::ByteSequence &aThreadId, bool bAsynchron)
 
void waitInPool (rtl::Reference< ORequestThread > const &pThread)
 
void joinWorkers ()
 
ThreadAdmingetThreadAdmin ()
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Private Member Functions

bool createThread (JobQueue *pQueue, const ::rtl::ByteSequence &aThreadId, bool bAsynchron)
 

Private Attributes

ThreadIdHashMap m_mapQueue
 
std::mutex m_mutex
 
std::mutex m_mutexWaitingThreadList
 
WaitingThreadDeque m_dequeThreads
 
DisposedCallerAdminHolder m_DisposedCallerAdmin
 
ThreadAdmin m_aThreadAdmin
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Definition at line 117 of file threadpool.hxx.

Constructor & Destructor Documentation

◆ ThreadPool()

cppu_threadpool::ThreadPool::ThreadPool ( )

Definition at line 75 of file threadpool.cxx.

◆ ~ThreadPool()

cppu_threadpool::ThreadPool::~ThreadPool ( )
overridevirtual

Definition at line 80 of file threadpool.cxx.

References m_mapQueue, and SAL_WARN_IF.

Member Function Documentation

◆ addJob()

bool cppu_threadpool::ThreadPool::addJob ( const ::rtl::ByteSequence &  aThreadId,
bool  bAsynchron,
void *  pThreadSpecificData,
RequestFun doRequest,
void const *  disposeId 
)

◆ createThread()

bool cppu_threadpool::ThreadPool::createThread ( JobQueue pQueue,
const ::rtl::ByteSequence &  aThreadId,
bool  bAsynchron 
)
private

◆ destroy()

void cppu_threadpool::ThreadPool::destroy ( void const *  nDisposeId)

Definition at line 103 of file threadpool.cxx.

References m_DisposedCallerAdmin.

◆ dispose()

void cppu_threadpool::ThreadPool::dispose ( void const *  nDisposeId)

Definition at line 85 of file threadpool.cxx.

References m_DisposedCallerAdmin, m_mapQueue, and m_mutex.

◆ enter()

void * cppu_threadpool::ThreadPool::enter ( const ::rtl::ByteSequence &  aThreadId,
void const *  nDisposeId 
)

◆ getThreadAdmin()

ThreadAdmin & cppu_threadpool::ThreadPool::getThreadAdmin ( )
inline

Definition at line 144 of file threadpool.hxx.

References m_aThreadAdmin.

◆ joinWorkers()

void cppu_threadpool::ThreadPool::joinWorkers ( )

◆ prepare()

void cppu_threadpool::ThreadPool::prepare ( const ::rtl::ByteSequence &  aThreadId)

Definition at line 273 of file threadpool.cxx.

References m_mapQueue, m_mutex, and p.

◆ revokeQueue()

bool cppu_threadpool::ThreadPool::revokeQueue ( const ::rtl::ByteSequence &  aThreadId,
bool  bAsynchron 
)

Definition at line 178 of file threadpool.cxx.

References m_mapQueue, and m_mutex.

Referenced by enter().

◆ waitInPool()

void cppu_threadpool::ThreadPool::waitInPool ( rtl::Reference< ORequestThread > const &  pThread)

Member Data Documentation

◆ m_aThreadAdmin

ThreadAdmin cppu_threadpool::ThreadPool::m_aThreadAdmin
private

Definition at line 157 of file threadpool.hxx.

Referenced by getThreadAdmin(), and joinWorkers().

◆ m_dequeThreads

WaitingThreadDeque cppu_threadpool::ThreadPool::m_dequeThreads
private

Definition at line 154 of file threadpool.hxx.

Referenced by createThread(), joinWorkers(), and waitInPool().

◆ m_DisposedCallerAdmin

DisposedCallerAdminHolder cppu_threadpool::ThreadPool::m_DisposedCallerAdmin
private

Definition at line 156 of file threadpool.hxx.

Referenced by addJob(), destroy(), and dispose().

◆ m_mapQueue

ThreadIdHashMap cppu_threadpool::ThreadPool::m_mapQueue
private

Definition at line 150 of file threadpool.hxx.

Referenced by addJob(), dispose(), enter(), prepare(), revokeQueue(), and ~ThreadPool().

◆ m_mutex

std::mutex cppu_threadpool::ThreadPool::m_mutex
private

Definition at line 151 of file threadpool.hxx.

Referenced by addJob(), dispose(), enter(), prepare(), and revokeQueue().

◆ m_mutexWaitingThreadList

std::mutex cppu_threadpool::ThreadPool::m_mutexWaitingThreadList
private

Definition at line 153 of file threadpool.hxx.

Referenced by createThread(), joinWorkers(), and waitInPool().


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