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
. A
thread object uniquely represents a particular thread of
execution
. 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
. A
thread of execution is
detached when no
thread object represents that thread
. Objects of class
thread can be in a state that does not represent a thread of
execution
. [
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 or
join. —
end note]