std::jthread::operator=(3)
π std::jthread::operator=(3) π
okay so this is the page for std::jthread::operator= from the C++ Standard Libary manual, and itβs giving very specific move-assignment energy. π«Άβ¨
β¨ NAME β¨
std::jthread::operator= β literally std::jthread::operator=. No cap, thatβs the name. π
π Synopsis π
std::jthread& operator=( std::jthread&& other ) noexcept;
(since C++20) π¦
If *this still has an associated running thread (i.e. joinable() == true), it calls request_stop() followed by join(). Then it assigns the state of other to *this and sets other to a default constructed state.
After this call, this->get_id() is equal to the value of other.get_id() prior to the call, and the associated stop-state is also moved. Also, other no longer represents a thread of execution nor has any stop-state. Periodt. πβ¨
π Parameters π
otherβ anotherjthreadobject to assign to thisjthreadobject. Thatβs the whole assignment vibe, bestie. π¦
π Return value π
It hands you back *this. Thatβs it, thatβs the return value. π
This page came from http://cppreference.com, version 2024.06.10, and itβs std::jthread::operator=(3) β mwah ππ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms