Lines Matching refs:thread
1 // <thread> -*- C++ -*-
25 /** @file include/thread
43 #include <bits/std_thread.h> // std::thread, get_id, yield
55 * Classes for thread support.
59 // std::thread is defined in <bits/std_thread.h>
61 /// @relates std::thread::id @{
65 operator<=>(thread::id __x, thread::id __y) noexcept
69 operator!=(thread::id __x, thread::id __y) noexcept
73 operator<(thread::id __x, thread::id __y) noexcept
81 operator<=(thread::id __x, thread::id __y) noexcept
85 operator>(thread::id __x, thread::id __y) noexcept
89 operator>=(thread::id __x, thread::id __y) noexcept
95 operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id)
97 if (__id == thread::id())
98 return __out << "thread::id of a non-executing thread";
118 /** A thread with cancellation and automatic joining.
120 * Unlike `std::thread`, destroying a joinable `std::jthread` will not
121 * terminate the process. Instead, it will try to request its thread to
125 * as the first argument to the callable that runs in the new thread
127 * be used to send a stop request that the new thread can test for.
129 * @headerfile thread
135 using id = thread::id;
136 using native_handle_type = thread::native_handle_type;
213 return thread::hardware_concurrency();
240 static thread
250 return thread{std::forward<_Callable>(__f), __ssrc.get_token(),
258 return thread{std::forward<_Callable>(__f),
265 static thread
269 return thread{__f, std::forward<_Obj>(__obj), __ssrc.get_token(),
275 thread _M_thread;