std::thread::operator=
提供: cppreference.com
<tbody>
</tbody>
thread& operator=( thread&& other ) noexcept; |
(C++11以上) | |
*this に実行中のスレッドが紐付けられている (すなわち joinable() == true) 場合は、 std::terminate() が呼ばれます。 そうでなければ、 other の状態を *this に代入し、 other をデフォルト構築された状態に設定します。
この呼び出しの後、 this->get_id() は呼び出し前の other.get_id()の値と等しくなり、 other は実行のスレッドを表さなくなります。
引数
| other | - | このスレッドオブジェクトに代入する別のスレッドオブジェクト |
戻り値
*this。