Common thread functions.
More...
#include <thread.hpp>
|
| static void | setMain () noexcept |
| | Sets current thread as main.
|
| static bool | isCurrentMain () noexcept |
| | Returns true if current thread is main.
|
| static void | getName (char *name, size_t size) noexcept |
| | Returns current thread name.
|
| static void | setName (const string &name) noexcept |
| | Sets current thread name.
|
| static void | setForegroundPriority () noexcept |
| | Sets current thread priority to foreground.
|
| static void | setBackgroundPriority () noexcept |
| | Sets current thread priority to background.
|
| static void | sleep (double delay) noexcept |
| | Blocks the execution of the current thread for a specified time.
|
Common thread functions.
See the thread.h
◆ setMain()
◆ isCurrentMain()
◆ getName()
| void getName |
( |
char * | name, |
|
|
size_t | size ) |
|
inlinestaticnoexcept |
Returns current thread name.
See the getThreadName().
- Parameters
-
| [out] | name | pointer to the thread name string |
| size | maximal name string capacity (including '\0') |
◆ setName()
| void setName |
( |
const string & | name | ) |
|
|
inlinestaticnoexcept |
Sets current thread name.
See the setThreadName().
- Parameters
-
| [in] | name | thread name string |
◆ setForegroundPriority()
| void setForegroundPriority |
( |
| ) |
|
|
inlinestaticnoexcept |
◆ setBackgroundPriority()
| void setBackgroundPriority |
( |
| ) |
|
|
inlinestaticnoexcept |
◆ sleep()
| void sleep |
( |
double | delay | ) |
|
|
inlinestaticnoexcept |
Blocks the execution of the current thread for a specified time.
See the setThreadBackgroundPriority().
- Parameters
-
| delay | thread sleep delay time (in seconds) |