The xtd::threading::this_thread namespace contains some current thread properties and sheduling methods.
Public Static Properties | |
| xtd::intptr | handle () noexcept |
| Gets the thread handle of the current thread. | |
| xtd::int32 | managed_thread_id () noexcept |
| Gets the managed thread id of the current thread. | |
| xtd::string | name () noexcept |
| Gets the thread name of the current thread. | |
| void | name (const xtd::string &name) |
| Sets the thread name of the current thread. | |
| xtd::threading::thread_priority | priority () noexcept |
| Gets the thread priority of the current thread. | |
| void | priority (xtd::threading::thread_priority priority) |
| Sets the thread priority of the current thread. | |
| xtd::intptr | thread_id () noexcept |
| Gets the thread id of the current thread. | |
Public Static Methods | |
| xtd::intptr | get_id () noexcept |
| Returns the thread id of the current thread. | |
| void | sleep_for (const xtd::time_span &sleep_duration) |
| Stops the execution of the current thread for a specified time duration. | |
| void | sleep_until (const xtd::date_time &sleep_time) |
| Stops the execution of the current thread until a specified time point. | |
| bool | yield () noexcept |
| Suggests that the implementation reschedule execution of threads. | |