共用方式為


交換函式 (<thread>)

交換兩個 thread 物件的狀態。

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

參數

  • Left
    表示 thread 物件。

  • Right
    無效的 thread 物件。

備註

函式會呼叫 Left.swap(Right)。

需求

標題: 執行緒

命名空間: 可以

請參閱

參考

thread Class

<thread>

thread::swap 方法