Thread defines an easy way to manipulate a thread. More...
#include <Thread.hpp>
Public Types | |
typedef void(* | FuncType )(void *) |
Public Member Functions | |
Thread (FuncType Function, void *UserData=NULL) | |
Construct the thread from a function pointer. More... | |
virtual | ~Thread () |
Virtual destructor. More... | |
void | Launch () |
Create and run the thread. More... | |
void | Wait () |
Wait until the thread finishes. More... | |
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. More... | |
Protected Member Functions | |
Thread () | |
Default constructor. More... | |
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.
sf::Thread::Thread | ( | Thread::FuncType | Function, |
void * | UserData = NULL |
||
) |
Construct the thread from a function pointer.
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.
|
virtual |
Virtual destructor.
Definition at line 62 of file Thread.cpp.
|
protected |
Default constructor.
Definition at line 38 of file Thread.cpp.
void sf::Thread::Launch | ( | ) |
Create and run the thread.
Definition at line 72 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.
Definition at line 109 of file Thread.cpp.
void sf::Thread::Wait | ( | ) |
Wait until the thread finishes.
Definition at line 89 of file Thread.cpp.