sf::Thread Class Reference

Thread defines an easy way to manipulate a thread. More...

#include <Thread.hpp>

Inheritance diagram for sf::Thread:

sf::NonCopyable sf::SoundRecorder sf::SoundStream sf::SoundBufferRecorder sf::Music

List of all members.


Public Types

typedef void(* FuncType )(void *)

Public Member Functions

 Thread (FuncType Function, void *UserData=NULL)
 Construct the thread from a function pointer.
virtual ~Thread ()
 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

 Thread ()
 Default constructor.

Detailed Description

Thread defines an easy way to manipulate a thread.

There are two ways to use Thread :

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


Constructor & Destructor Documentation

sf::Thread::Thread ( Thread::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 50 of file Thread.cpp.

sf::Thread::~Thread (  )  [virtual]

Virtual destructor.

Definition at line 62 of file Thread.cpp.

sf::Thread::Thread (  )  [protected]

Default constructor.

Definition at line 38 of file Thread.cpp.


Member Function Documentation

void sf::Thread::Launch (  ) 

Create and run the thread.

Definition at line 73 of file Thread.cpp.

void sf::Thread::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.

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 107 of file Thread.cpp.

void sf::Thread::Wait (  ) 

Wait until the thread finishes.

Definition at line 87 of file Thread.cpp.


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