SDL3pp
A slim C++ wrapper for SDL3
|
Semi-safe reference for Thread.
Public Member Functions | |
ThreadRef (ThreadParam resource) | |
Constructs from ThreadParam. More... | |
ThreadRef (const ThreadRef &other) | |
Copy constructor. | |
~ThreadRef () | |
Destructor. | |
![]() | |
constexpr | Thread ()=default |
Default ctor. | |
constexpr | Thread (const ThreadRaw resource) |
Constructs from ThreadParam. More... | |
constexpr | Thread (const Thread &other)=delete |
Copy constructor. | |
constexpr | Thread (Thread &&other) |
Move constructor. | |
constexpr | Thread (const ThreadRef &other)=delete |
constexpr | Thread (ThreadRef &&other)=delete |
Thread (ThreadCB fn, StringParam name) | |
Default ctor. | |
Thread (ThreadFunction fn, StringParam name, void *data) | |
Create a new thread with a default stack size. More... | |
Thread (PropertiesParam props) | |
Create a new thread with with the specified properties. More... | |
~Thread () | |
Destructor. | |
Thread & | operator= (Thread other) |
Assignment operator. | |
constexpr ThreadRaw | get () const |
Retrieves underlying ThreadRaw. | |
constexpr ThreadRaw | release () |
Retrieves underlying ThreadRaw and clear this. | |
constexpr auto | operator<=> (const Thread &other) const =default |
Comparison. | |
constexpr bool | operator== (std::nullptr_t _) const |
Comparison. | |
constexpr | operator bool () const |
Converts to bool. | |
constexpr | operator ThreadParam () const |
Converts to ThreadParam. | |
void | Detach () |
Let a thread clean up on exit without intervention. More... | |
const char * | GetName () const |
Get the thread name as it was specified in Thread.Thread(). More... | |
ThreadID | GetID () const |
Get the thread identifier for the specified thread. More... | |
void | Wait (int *status) |
Wait for a thread to finish. More... | |
ThreadState | GetState () const |
Get the current state of a thread. More... | |
Additional Inherited Members | |
![]() | |
static void | SetCurrentPriority (ThreadPriority priority) |
Set the priority for the current thread. More... | |
|
inline |
resource | a ThreadRaw or Thread. |
This does not takes ownership!