Calling-thread helpers (the current thread, not a child process). More...
Enumerations | |
| enum class | Error { Success = 0 , TooLong , Failed } |
| ThisThread enumerators. More... | |
Functions | |
| StormByte::Error::Fault | LastError () noexcept |
| Last ThisThread error on this thread. | |
| template<typename Rep , typename Period > | |
| void | Sleep (const std::chrono::duration< Rep, Period > &duration) |
| Suspend the calling thread. | |
| bool | Name (std::string_view name) |
| Set the calling thread name. | |
| bool | Name (StormByte::String::String &name) |
| Read the calling thread name. | |
Calling-thread helpers (the current thread, not a child process).
Sleep does not touch LastError. Every other call returns true on success and updates LastError for this thread. An output String is valid only when the call returned true.
|
strong |
ThisThread enumerators.
Domain tag StormByte.System.ThisThread. Zero is success.
| Enumerator | |
|---|---|
| Success | No error. |
| TooLong | The name exceeds the platform limit. |
| Failed | The platform call failed. |
|
noexcept |
Last ThisThread error on this thread.
| bool StormByte::System::ThisThread::Name | ( | std::string_view | name | ) |
Set the calling thread name.
| name | Proposed name. Not truncated. |
| bool StormByte::System::ThisThread::Name | ( | StormByte::String::String & | name | ) |
Read the calling thread name.
| [out] | name | Owned UTF-8 text. Written only on success. |
|
inline |
Suspend the calling thread.
| Rep | Duration representation. |
| Period | Duration period. |
| duration | Sleep interval. |