logog
logger optimized for games
Thread Class Reference

#include <thread.hpp>

Public Types

typedef void *(* ThreadStartLocationType) (void *)
 

Public Member Functions

 Thread (ThreadStartLocationType fnThreadStart, void *pvParams)
 
int Start ()
 

Static Public Member Functions

static int WaitFor (const Thread &thread)
 
static LOGOG_THREAD GetCurrent ()
 

Detailed Description

A thread abstraction. Requires definition of macros to describe how to create, start, and wait for threads to terminate.

Member Typedef Documentation

typedef void*(* ThreadStartLocationType) (void *)

A type describing the entry point of a function.

Constructor & Destructor Documentation

Thread ( ThreadStartLocationType  fnThreadStart,
void *  pvParams 
)
inline

Creating a new thread requires the starting location as well as a single void pointer to the argument to a function.

Member Function Documentation

static LOGOG_THREAD GetCurrent ( )
inlinestatic

Returns a LOGOG_THREAD representing the calling process.

int Start ( )
inline

Cause the created thread to commence execution asynchronously.

static int WaitFor ( const Thread thread)
inlinestatic

Causes the current thread to wait for completion of the provided thread.

Parameters
threadThe thread object to wait for

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