std::thread::operator=

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

版本历史

  • (当前 | 先前 2017年8月25日 (五) 06:26Fruderica讨论 | 贡献. . (689字节) (-404). . (撤销)
  • 当前 | 先前 2013年7月2日 (二) 11:36P12bot讨论 | 贡献 . . (1,093字节) (-26). . (Use {{lc}}. Update links. Various fixes.) (撤销)
  • 当前 | 先前 2012年11月2日 (五) 18:21P12bot讨论 | 贡献 . . (1,119字节) (+281). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 03:32P12讨论 | 贡献 . . (838字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月25日 (四) 12:00TranslationBot讨论 | 贡献. . (838字节) (+838). . (Translated from the English version using Google Translate)