Share via


swap Function (<thread>)

Swaps the states of two thread objects.

void swap(
   thread& Left,
   thread& Right
) _NOEXCEPT;

Parameters

  • Left
    The left thread object.

  • Right
    The right thread object.

Remarks

The function calls Left.swap(Right).

Requirements

Header: thread

Namespace: std

See Also

Reference

thread Class

<thread>

thread::swap Method