std::thread::operator=
来自 cppreference.cn
| thread& operator=( thread&& other ) noexcept; |
(C++11 起) | |
如果 *this 仍然有一个关联的运行线程(即 joinable() == true),则调用 std::terminate()。否则,将 other 的状态赋值给 *this,并将 other 设置为默认构造的状态。
此调用后,this->get_id() 等于调用前 other.get_id() 的值,并且 other 不再表示执行线程。
[编辑] 参数
| 其他 | - | 要赋值给此线程对象的另一个线程对象 |
[编辑] 返回值
*this