Gizmo3D

gzThread.h File Reference

Thread Management. More...

#include "gzBasicTypes.h"
#include "gzMemory.h"
#include "gzMutex.h"
#include "gzReference.h"
#include "gzStackInfo.h"
#include <process.h>

Go to the source code of this file.

Classes

struct  gzThreadInfo
class  gzThread
class  gzThreadTicker
class  gzThreadPoolTicker
class  gzThreadData< T >
class  gzThreadData< T >::_localData< T2 >

Defines

#define gzSleep   gzThread::gzDelayFunction
#define gzMicroSleep   gzThread::gzMicroDelayFunction

Typedefs

typedef gzUInt gzThreadReturnValue

Enumerations

enum  gzThreadPriority {
  GZ_THREAD_PRIO_LOWEST, GZ_THREAD_PRIO_LOW, GZ_THREAD_PRIO_NORMAL, GZ_THREAD_PRIO_HIGH,
  GZ_THREAD_PRIO_HIGHEST
}
 Base class for threads. More...
enum  gzTickPolicy { GZ_TICK_ACCUM, GZ_TICK_SKIP }

Variables

const gzULong GZ_SLEEP_SECOND = 1000
 Sleep time for one second.
const gzULong GZ_SLEEP_INFINITE = 0xFFFFFFFFUL
 Infinite sleep time.
const gzULong GZ_THREADSLOTS = 10000


Detailed Description

Thread Management.

GizmoSDK uses light weight treads for mulitasking.

Definition in file gzThread.h.


Define Documentation

#define gzMicroSleep   gzThread::gzMicroDelayFunction
 

Definition at line 203 of file gzThread.h.

#define gzSleep   gzThread::gzDelayFunction
 

Examples:
dbviewer.cpp, shaders.cpp, skybox.cpp, and tree.cpp.

Definition at line 201 of file gzThread.h.


Typedef Documentation

typedef gzUInt gzThreadReturnValue
 

Definition at line 51 of file gzThread.h.


Enumeration Type Documentation

enum gzThreadPriority
 

Base class for threads.

Derive your class from gzThread and implement the virtual method process(). It should look like this.

gzVoid MyClass::process()
{
    while(!isStopping())
    {
        // Do something
    }
}

You control it by using MyClass.run() and MyClass.stop(). All methods are thread safe

Enumerator:
GZ_THREAD_PRIO_LOWEST 
GZ_THREAD_PRIO_LOW 
GZ_THREAD_PRIO_NORMAL 
GZ_THREAD_PRIO_HIGH 
GZ_THREAD_PRIO_HIGHEST 

Definition at line 123 of file gzThread.h.

enum gzTickPolicy
 

Enumerator:
GZ_TICK_ACCUM 
GZ_TICK_SKIP 

Definition at line 205 of file gzThread.h.


Variable Documentation

const gzULong GZ_SLEEP_INFINITE = 0xFFFFFFFFUL
 

Infinite sleep time.

Definition at line 43 of file gzThread.h.

const gzULong GZ_SLEEP_SECOND = 1000
 

Sleep time for one second.

Definition at line 40 of file gzThread.h.

const gzULong GZ_THREADSLOTS = 10000
 

Definition at line 125 of file gzThread.h.


Documentation for Gizmo3D generated at Wed Feb 20 11:54:14 2008 by   Saab Training Systems AB, ¸ (c) 2003-and beyond