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 | - | 赋值给此 thread 对象的另一 thread 对象 |
返回值
*this