operator=
描述 (Description)
它用于移动分配线程。
声明 (Declaration)
以下是std :: thread :: operator = function的声明。
thread& operator= (thread&& rhs) noexcept;
thread& operator= (const thread&) = delete;
C++11
thread& operator= (thread&& rhs) noexcept;
thread& operator= (const thread&) = delete;
参数 (Parameters)
rhs - 这是一个othread对象。
返回值 (Return Value)
它返回* this。
异常 (Exceptions)
No-throw guarantee - 永不抛出异常。
数据竞争 (Data races)
rhs和对象都被修改。