Namespaces
Variants
Views
Actions

std::swap(std::thread)

From cppreference.com
void swap( thread &lhs, thread &rhs );
(since C++11)

Overloads the std::swap algorithm for std::thread. Exchanges the state of lhs with that of rhs. Effectively calls lhs.swap(rhs).

Contents

[edit] Parameters

lhs, rhs - threads whose states to swap

[edit] Return value

(none)

[edit] Exceptions

noexcept specification:  
noexcept
  (since C++11)

[edit] Example

[edit] See also

swaps two thread objects
(public member function) [edit]