Lines Matching refs:thread

1 // <thread> -*- C++ -*-
25 /** @file include/thread
68 * Classes for thread support.
72 /// thread
73 class thread
77 // invoked in the new thread of execution.
87 /// thread::id
99 friend class thread;
123 // 3039. Unnecessary decay in thread and packaged_task
125 using __not_same = __not_<is_same<__remove_cvref_t<_Tp>, thread>>;
128 thread() noexcept = default;
133 thread(_Callable&& __f, _Args&&... __args)
137 "std::thread arguments must be invocable after conversion to rvalues"
154 ~thread()
160 thread(const thread&) = delete;
162 thread(thread&& __t) noexcept
165 thread& operator=(const thread&) = delete;
167 thread& operator=(thread&& __t) noexcept
176 swap(thread& __t) noexcept
193 /** @pre thread is joinable
199 // Returns a value that hints at the number of hardware thread contexts.
292 swap(thread& __x, thread& __y) noexcept
296 operator==(thread::id __x, thread::id __y) noexcept
298 // pthread_equal is undefined if either thread ID is not valid, so we
307 operator<=>(thread::id __x, thread::id __y) noexcept
311 operator!=(thread::id __x, thread::id __y) noexcept
315 operator<(thread::id __x, thread::id __y) noexcept
323 operator<=(thread::id __x, thread::id __y) noexcept
327 operator>(thread::id __x, thread::id __y) noexcept
331 operator>=(thread::id __x, thread::id __y) noexcept
336 /// std::hash specialization for thread::id.
338 struct hash<thread::id>
339 : public __hash_base<size_t, thread::id>
342 operator()(const thread::id& __id) const noexcept
348 operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id)
350 if (__id == thread::id())
351 return __out << "thread::id of a non-executing thread";
357 * @brief ISO C++ 2011 namespace for interacting with the current thread
359 * C++11 30.3.2 [thread.thread.this] Namespace this_thread.
364 inline thread::id
368 return thread::id(_GLIBCXX_NATIVE_THREAD_ID);
370 return thread::id(__gthread_self());
438 using id = thread::id;
439 using native_handle_type = thread::native_handle_type;
516 return thread::hardware_concurrency();
543 static thread
548 return thread{std::forward<_Callable>(__f), __ssrc.get_token(),
554 "std::thread arguments must be invocable after"
556 return thread{std::forward<_Callable>(__f),
562 thread _M_thread;