[thread.thread.class.general]

# 32 Concurrency support library [[thread]](./#thread)

## 32.4 Threads [[thread.threads]](thread.threads#thread.thread.class.general)

### 32.4.3 Class thread [[thread.thread.class]](thread.thread.class#general)

#### 32.4.3.1 General [thread.thread.class.general]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L1443)

The class thread provides a mechanism to create a new thread of execution, to join with
a thread (i.e., wait for a thread to complete), and to perform other operations that manage and
query the state of a thread[.](#1.sentence-1)

A thread object uniquely represents a particular thread of
execution[.](#1.sentence-2)

That representation may be transferred to other thread objects in such a way
that no two thread objects simultaneously represent the same thread of execution[.](#1.sentence-3)

A
thread of execution is [*detached*](#def:detached) when no thread object represents that thread[.](#1.sentence-4)

Objects of class thread can be in a state that does not represent a thread of
execution[.](#1.sentence-5)

[*Note [1](#note-1)*:

A thread object does not represent a thread of execution after
default construction, after being moved from, or after a successful call to detach orjoin[.](#1.sentence-6)

â *end note*]

[ð](#lib:thread)

namespace std {class thread {public:// [[thread.thread.id]](thread.thread.id "32.4.3.2 Class thread​::​id"), class thread​::​idclass id; using native_handle_type = *implementation-defined*; // see [[thread.req.native]](thread.req.native "32.2.3 Native handles")// construct/copy/destroy thread() noexcept; template<class F, class... Args> explicit thread(F&& f, Args&&... args); ~thread();
 thread(const thread&) = delete;
 thread(thread&&) noexcept;
 thread& operator=(const thread&) = delete;
 thread& operator=(thread&&) noexcept; // [[thread.thread.member]](thread.thread.member "32.4.3.6 Members"), membersvoid swap(thread&) noexcept; bool joinable() const noexcept; void join(); void detach();
 id get_id() const noexcept;
 native_handle_type native_handle(); // see [[thread.req.native]](thread.req.native "32.2.3 Native handles")// static membersstatic unsigned int hardware_concurrency() noexcept; };}
