<thread>

public member function
<thread>

std::thread::swap

void swap (thread& x) noexcept;
Swap threads
Swaps the state of the object with that of x.

Parameters

x
thread object whose state is swapped with that of *this.

Return value

none

Data races

Both x and the object are modified.

Exception safety

No-throw guarantee: never throws exceptions.

See also