C++ 執行緒庫 - swap 函式



描述

它將物件的狀態與 x 的狀態交換。

宣告

以下是 std::thread::swap 函式的宣告。

void swap (thread& x) noexcept;

C++11

void swap (thread& x) noexcept;

引數

x − 與 *this 交換狀態的執行緒物件。

返回值

異常

無異常保證 − 從不丟擲異常。

資料競爭

訪問物件。

thread.htm
廣告
© . All rights reserved.