Marsyas  0.5.0-beta1
Public Member Functions | Static Public Member Functions
Thread Class Reference

#include <Thread.h>

Public Member Functions

bool start (THREAD_FUNCTION routine, void *ptr=NULL)
 Begin execution of the thread routine. Upon success, TRUE is returned.
 Thread ()
 Default constructor.
bool wait (long milliseconds=-1)
 Wait the specified number of milliseconds for the thread to terminate. Return TRUE on success.
 ~Thread ()
 The class destructor waits indefinitely for the thread to end before returning.

Static Public Member Functions

static void test (void)
 Test for a thread cancellation request.

Detailed Description

Definition at line 73 of file Thread.h.


Constructor & Destructor Documentation

Thread ( )

Default constructor.

Definition at line 72 of file Thread.cpp.

~Thread ( )

The class destructor waits indefinitely for the thread to end before returning.

Definition at line 77 of file Thread.cpp.


Member Function Documentation

bool start ( THREAD_FUNCTION  routine,
void *  ptr = NULL 
)

Begin execution of the thread routine. Upon success, TRUE is returned.

The thread routine can be passed an argument via ptr. If the thread cannot be created, the return value is FALSE.

Definition at line 92 of file Thread.cpp.

void test ( void  ) [static]

Test for a thread cancellation request.

Definition at line 138 of file Thread.cpp.

bool wait ( long  milliseconds = -1)

Wait the specified number of milliseconds for the thread to terminate. Return TRUE on success.

If the specified time value is negative, the function will block indefinitely. Otherwise, the function will block up to a maximum of the specified time. A return value of FALSE indicates the thread did not terminate within the specified time limit.

Definition at line 113 of file Thread.cpp.


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