Shadowrun: Awakened 29 September 2011 - Build 871
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends
cat::ThreadPool Class Reference

#include <ThreadPool.hpp>

Inheritance diagram for cat::ThreadPool:

List of all members.

Public Member Functions

bool Associate (ThreadPoolHandle h, ThreadRefObject *key)
int GetProcessorCount ()
int GetThreadCount ()
void Shutdown ()
bool Startup ()

Protected Member Functions

bool SpawnThread ()
bool SpawnThreads ()
void TrackObject (ThreadRefObject *object)
void UntrackObject (ThreadRefObject *object)

Private Member Functions

 CAT_SINGLETON (ThreadPool)

Private Attributes

int _active_thread_count
ThreadRefObject_objectRefHead [REFOBJ_PRIO_COUNT]
Mutex _objectRefLock [REFOBJ_PRIO_COUNT]
int _processor_count
ThreadPoolWorker _threads [MAX_THREADS]

Static Private Attributes

static const int MAX_THREADS = 256

Friends

class ThreadRefObject

Detailed Description

Definition at line 183 of file ThreadPool.hpp.


Member Function Documentation

bool cat::ThreadPool::Associate ( ThreadPoolHandle  h,
ThreadRefObject key 
)
cat::ThreadPool::CAT_SINGLETON ( ThreadPool  ) [private]
int cat::ThreadPool::GetProcessorCount ( ) [inline]

Definition at line 214 of file ThreadPool.hpp.

References _processor_count.

{ return _processor_count; }
int cat::ThreadPool::GetThreadCount ( ) [inline]

Definition at line 215 of file ThreadPool.hpp.

References _active_thread_count.

void cat::ThreadPool::Shutdown ( )
bool cat::ThreadPool::SpawnThread ( ) [protected]
bool cat::ThreadPool::SpawnThreads ( ) [protected]
bool cat::ThreadPool::Startup ( )
void cat::ThreadPool::TrackObject ( ThreadRefObject object) [protected]
void cat::ThreadPool::UntrackObject ( ThreadRefObject object) [protected]

Friends And Related Function Documentation

friend class ThreadRefObject [friend]

Definition at line 185 of file ThreadPool.hpp.


Member Data Documentation

Definition at line 193 of file ThreadPool.hpp.

Referenced by GetThreadCount().

ThreadRefObject* cat::ThreadPool::_objectRefHead[REFOBJ_PRIO_COUNT] [private]

Definition at line 200 of file ThreadPool.hpp.

Mutex cat::ThreadPool::_objectRefLock[REFOBJ_PRIO_COUNT] [private]

Definition at line 199 of file ThreadPool.hpp.

Definition at line 193 of file ThreadPool.hpp.

Referenced by GetProcessorCount().

Definition at line 196 of file ThreadPool.hpp.

const int cat::ThreadPool::MAX_THREADS = 256 [static, private]

Definition at line 195 of file ThreadPool.hpp.


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

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net