<thread>
functions
Uniquely identifies the current thread of execution.
thread::id this_thread::get_id() noexcept;
An object of type thread::id that uniquely identifies the current thread of execution.
Blocks the calling thread.
template <class Rep,
class Period>
inline void sleep_for(const chrono::duration<Rep, Period>& Rel_time);
Rel_time
A duration object that specifies a time interval.
The function blocks the calling thread for at least the time that's specified by Rel_time. This function does not throw any exceptions.
Blocks the calling thread at least until the specified time.
template <class Clock, class Duration>
void sleep_until(const chrono::time_point<Clock, Duration>& Abs_time);
void sleep_until(const xtime *Abs_time);
Abs_time
Represents a point in time.
This function does not throw any exceptions.
Swaps the states of two thread
objects.
void swap(thread& Left, thread& Right) noexcept;
Left
The left thread
object.
Right
The right thread
object.
The function calls Left.swap(Right)
.
Signals the operating system to run other threads, even if the current thread would ordinarily continue to run.
inline void yield() noexcept;