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も持ちません。
パラメータ
| その他 | - |
この
jthread
オブジェクトに代入する
別の
jthread
オブジェクト
|
戻り値
* this