std::jthread:: operator=
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
jthread::operator=
|
||||
| Observers | ||||
| Operations | ||||
| Stop token handling | ||||
| Non-member functions | ||||
|
std::
jthread
&
operator
=
(
std::
jthread
&&
other
)
noexcept
;
|
(C++20 이후) | |
만약 * this 에 여전히 연결된 실행 중인 스레드가 있는 경우(즉, joinable ( ) == true ), request_stop ( ) 를 호출한 후 join ( ) 를 호출합니다. other 의 상태를 * this 에 할당하고 other 를 기본 생성된 상태로 설정합니다.
이 호출 이후, this - > get_id ( ) 는 호출 전 other. get_id ( ) 값과 동일해지며, 관련된 stop-state도 이동됩니다. 또한 other 는 더 이상 실행 스레드를 나타내지 않으며 어떤 stop-state도 가지지 않게 됩니다.
매개변수
| other | - |
another
jthread
object to assign to this
jthread
object
|
반환값
* this