TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
G3D::_internal::BasicThread Class Reference

Public Member Functions

 BasicThread (const std::string &name, void(*proc)(void *), void *param)
 
- Public Member Functions inherited from G3D::GThread
 GThread (const std::string &name)
 
virtual ~GThread ()
 
bool start (SpawnBehavior behavior=USE_NEW_THREAD)
 
void terminate ()
 
bool running () const
 
bool started () const
 
bool completed () const
 
void waitForCompletion ()
 
const std::string & name ()
 
- Public Member Functions inherited from G3D::ReferenceCountedObject
virtual ~ReferenceCountedObject ()
 

Protected Member Functions

virtual void threadMain ()
 

Private Attributes

void(* m_wrapperProc )(void *)
 
void * m_param
 

Additional Inherited Members

- Public Types inherited from G3D::GThread
enum  { NUM_CORES = -100 }
 
typedef shared_ptr< class GThreadRef
 
- Static Public Member Functions inherited from G3D::GThread
static int numCores ()
 
static GThreadRef create (const std::string &name, void(*proc)(void *), void *param=NULL)
 
template<class Class >
static void runConcurrently2D (const Vector2int32 &start, const Vector2int32 &upTo, Class *object, void(Class::*method)(int x, int y), int maxThreads=NUM_CORES)
 Iterates over a 2D region using multiple threads and blocks until all threads have completed. More...
 
template<class Class >
static void runConcurrently2D (const Vector2int32 &start, const Vector2int32 &upTo, Class *object, void(Class::*method)(int x, int y, int threadID), int maxThreads=NUM_CORES)
 
- Static Public Attributes inherited from G3D::GThread
static const SpawnBehavior USE_CURRENT_THREAD = G3D::USE_CURRENT_THREAD
 
static const SpawnBehavior USE_NEW_THREAD = G3D::USE_NEW_THREAD
 

Constructor & Destructor Documentation

G3D::_internal::BasicThread::BasicThread ( const std::string &  name,
void(*)(void *)  proc,
void *  param 
)
inline
21  :
22  GThread(name), m_wrapperProc(proc), m_param(param) { }
GThread(const GThread &)
void * m_param
Definition: GThread.cpp:31
const std::string & name()
Definition: GThread.h:121
void(* m_wrapperProc)(void *)
Definition: GThread.cpp:29

Member Function Documentation

virtual void G3D::_internal::BasicThread::threadMain ( )
inlineprotectedvirtual

Overriden by the thread implementor

Implements G3D::GThread.

24  {
26  }
void * m_param
Definition: GThread.cpp:31
void(* m_wrapperProc)(void *)
Definition: GThread.cpp:29

Member Data Documentation

void* G3D::_internal::BasicThread::m_param
private
void(* G3D::_internal::BasicThread::m_wrapperProc)(void *)
private

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