std::thread::operator=
来自cppreference.com
并发支持库
|
|
thread& operator=( thread&& other ) noexcept; | (C++11 起) | |
若 *this 仍拥有关联的运行中进程(即 joinable() == true),则调用 std::terminate()。否则,赋值 other 的状态给 *this 并设置 other 为默认构造的状态。
此调用后,this->get_id() 等于 other.get_id() 在调用前的值,而 other 不再表示执行线程。
参数
other | - | 赋值给此线程对象的另一线程对象 |
返回值
*this