std::stop_token(3)
πΈ std::stop_token β from the libstdc++ girlies π
okay so bestie, welcome to the manual page for std::stop_token β¨ it lives in the Library Functions Manual and it's genuinely one of those little header-only cuties that makes threading not a total nightmare. no cap.
π NAME π
std::stop_token β the lil guy that lets you check whether a stop request has been made on a stop_source. that's it. that's the whole job. and it ate. π
β¨ SYNOPSIS β¨
#include <stop_token>
π Public Member Functions π
stop_token(const stop_token &)noexcept=defaultβ copy constructor, defaulted,noexcept, no drama πstop_token(stop_token &&)noexcept=defaultβ move constructor, also defaulted andnoexceptπ¦stop_token &operator=(const stop_token &)noexcept=defaultβ copy assignment, defaulted,noexcept, iconic πstop_token &operator=(stop_token &&)noexcept=defaultβ move assignment, defaulted,noexcept, slay β¨bool stop_possible()const noexceptβ tells you if a stop is even possible π«Άbool stop_requested()const noexceptβ tells you if a stop has actually been requested πvoid swap(stop_token &__rhs)noexceptβ swaps with__rhs,noexcept, no notes πΈ
π Friends π
bool operator==(const stop_token &__a, const stop_token &__b)β comparing two tokens,__avs__b, equality check πtemplate<typename _Callback> class stop_callbackβ the callback class, templated on_Callbackπ₯class stop_sourceβ the source itself, the main character of the whole stop situation πvoid swap(stop_token &__lhs, stop_token &__rhs)noexceptβ the free-functionswapfor__lhsand__rhs, alsonoexceptβ
π Detailed Description π
Allow testing whether a stop request has been made on a stop_source. literally that's the vibe check. it's giving "cooperative cancellation but make it cute." π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. not a human, not a girlie, just a doc generator doing its thing fr fr π
okay that's the whole page bestie π«Ά this was libstdc++'s std::stop_token(3) β stay stoppable, stay slay, and remember: the token just tests, it doesn't cancel anything for you. bye bestie πβ¨
π¦ where this page comes from
- centos-stream 10: gcc-toolset-15-libstdc++-docs 15.2.1-8.1.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- centos-stream 10: libstdc++-docs 14.4.1-4.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 43: libstdc++-docs 15.2.1-2.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 43: libstdc++-docs 15.3.1-1.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms