TrinityCore
|
#include <GThread.h>
Public Member Functions | |
_internalGThreadWorker (int threadID, const Vector2int32 &start, const Vector2int32 &upTo, Class *object, void(Class::*method1)(int x, int y), void(Class::*method2)(int x, int y, int threadID), const Vector2int32 &stride) | |
virtual void | threadMain () |
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 () |
Public Attributes | |
const int | threadID |
const Vector2int32 | start |
const Vector2int32 | upTo |
const Vector2int32 | stride |
Class * | object |
void(Class::* | method1 )(int x, int y) |
void(Class::* | method2 )(int x, int y, int threadID) |
Additional Inherited Members | |
Public Types inherited from G3D::GThread | |
enum | { NUM_CORES = -100 } |
typedef shared_ptr< class GThread > | Ref |
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 |
For use by runConcurrently2D. Designed for arbitrary iteration, although only used for interlaced rows in the current implementation.
|
inline |
|
inlinevirtual |
Overriden by the thread implementor
Implements G3D::GThread.
void(Class::* G3D::_internalGThreadWorker< Class >::method1)(int x, int y) |
void(Class::* G3D::_internalGThreadWorker< Class >::method2)(int x, int y, int threadID) |
Class* G3D::_internalGThreadWorker< Class >::object |
const Vector2int32 G3D::_internalGThreadWorker< Class >::start |
const Vector2int32 G3D::_internalGThreadWorker< Class >::stride |
const int G3D::_internalGThreadWorker< Class >::threadID |
Start for this thread, which differs from the others
const Vector2int32 G3D::_internalGThreadWorker< Class >::upTo |