xtd 0.2.0
Loading...
Searching...
No Matches
this_thread.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "thread.hpp"
6
8namespace xtd {
10 namespace threading {
12 namespace this_thread {
14
27 [[nodiscard]] auto handle() noexcept -> xtd::intptr;
28
40 [[nodiscard]] auto managed_thread_id() noexcept -> xtd::int32;
41
53 [[nodiscard]] auto name() noexcept -> xtd::string;
65 auto name(const xtd::string& name) -> void;
66
78 [[nodiscard]] auto priority() noexcept -> xtd::threading::thread_priority;
91
103 [[nodiscard]] auto thread_id() noexcept -> xtd::intptr;
105
107
120 [[nodiscard]] auto get_id() noexcept -> xtd::intptr;
121
134 auto sleep_for(const xtd::time_span& sleep_duration) -> void;
135
148 auto sleep_until(const xtd::date_time& sleep_time) -> void;
149
161 auto yield() noexcept -> bool;
163 }
164 }
165}
Represents an instant in time, typically expressed as a date and time of day.
Definition date_time.hpp:83
Represents a time interval.
Definition time_span.hpp:29
auto name() noexcept -> xtd::string
Gets the thread name of the current thread.
auto priority() noexcept -> xtd::threading::thread_priority
Gets the thread priority of the current thread.
auto yield() noexcept -> bool
Suggests that the implementation reschedule execution of threads.
auto handle() noexcept -> xtd::intptr
Gets the thread handle of the current thread.
auto thread_id() noexcept -> xtd::intptr
Gets the thread id of the current thread.
auto sleep_for(const xtd::time_span &sleep_duration) -> void
Stops the execution of the current thread for a specified time duration.
auto sleep_until(const xtd::date_time &sleep_time) -> void
Stops the execution of the current thread until a specified time point.
auto managed_thread_id() noexcept -> xtd::int32
Gets the managed thread id of the current thread.
auto get_id() noexcept -> xtd::intptr
Returns the thread id of the current thread.
thread_priority
Specifies the scheduling priority of a system::threading::thread.
Definition thread_priority.hpp:28
std::intmax_t intptr
Represent a pointer or a handle.
Definition intptr.hpp:23
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
The xtd::threading::this_thread namespace contains some current thread properties and sheduling metho...
Definition this_thread.hpp:12
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::threading::thread class.