sfThread Class Reference

sfThread defines a thread :) There is two ways to use sfThread : More...

#include <Thread.hpp>

Inheritance diagram for sfThread:

sfNonCopyable sfSoundRecorder sfSoundStream sfSoundBufferRecorder sfMusic List of all members.

Public Types

typedef void(*) FuncType (void *)

Public Member Functions

 sfThread (FuncType Function, void *UserData=NULL)
 Construct the thread from a function pointer.
virtual ~sfThread ()
 Virtual destructor.
void Launch ()
 Create and run the thread.
void Wait ()
 Wait until the thread finishes.
void Terminate ()
 Terminate the thread Terminating a thread with this function is not safe, you should rather try to make the thread function terminate by itself.

Protected Member Functions

 sfThread ()
 Default constructor.

Detailed Description

sfThread defines a thread :) There is two ways to use sfThread :

Definition at line 41 of file Win32/Thread.hpp.


Constructor & Destructor Documentation

sfThread::sfThread ( FuncType  Function,
void *  UserData = NULL 
)

Construct the thread from a function pointer.

Parameters:
Function : Entry point of the thread
UserData : Data to pass to the thread function (NULL by default)

Definition at line 48 of file Thread.cpp.

sfThread::~sfThread (  )  [virtual]

Virtual destructor.

Definition at line 60 of file Thread.cpp.

sfThread::sfThread (  )  [protected]

Default constructor.

Definition at line 36 of file Thread.cpp.


Member Function Documentation

void sfThread::Launch (  ) 

Create and run the thread.

Definition at line 71 of file Thread.cpp.

void sfThread::Wait (  ) 

Wait until the thread finishes.

Definition at line 85 of file Thread.cpp.

void sfThread::Terminate (  ) 

Terminate the thread Terminating a thread with this function is not safe, you should rather try to make the thread function terminate by itself.

Definition at line 105 of file Thread.cpp.


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