Thread.h File Reference

#include <SFML/Config.h>

Go to the source code of this file.


Typedefs

typedef sfThread sfThread
 sfThread defines an easy way to manipulate a thread

Functions

CSFML_API sfThreadsfThread_Create (void(*Function)(void *), void *UserData)
 Construct a new thread from a function pointer.
CSFML_API void sfThread_Destroy (sfThread *Thread)
 Destroy an existing thread.
CSFML_API void sfThread_Launch (sfThread *Thread)
 Run a thread.
CSFML_API void sfThread_Wait (sfThread *Thread)
 Wait until a thread finishes.
CSFML_API void sfThread_Terminate (sfThread *Thread)
 Terminate a thread Terminating a thread with this function is not safe, you should rather try to make the thread function terminate by itself.

Typedef Documentation

typedef struct sfThread sfThread

sfThread defines an easy way to manipulate a thread

Definition at line 37 of file Thread.h.


Function Documentation

CSFML_API sfThread* sfThread_Create ( void(*)(void *)  Function,
void *  UserData 
)

Construct a new thread from a function pointer.

Parameters:
Function : Entry point of the thread
UserData : Data to pass to the thread function

CSFML_API void sfThread_Destroy ( sfThread Thread  ) 

Destroy an existing thread.

Parameters:
Thread : Thread to delete

CSFML_API void sfThread_Launch ( sfThread Thread  ) 

Run a thread.

Parameters:
Thread : Thread to launch

CSFML_API void sfThread_Terminate ( sfThread Thread  ) 

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

Parameters:
Thread : Thread to terminate

CSFML_API void sfThread_Wait ( sfThread Thread  ) 

Wait until a thread finishes.

Parameters:
Thread : Thread to wait for