std::stop_source(3)
π std::stop_source β from the libstdc++ manual, bestie edition π
okay so you found the page for std::stop_source in the Library Functions Manual and I'm literally so proud of you. grab a strawberry π, this one's a banger.
β¨ NAME β¨
std::stop_source β a type that lets you make a stop request. that's it, that's the whole job. it's giving "the one who says stop" energy π
πΈ SYNOPSIS πΈ
first things first, you gotta let it in:
#include <stop_token>
π Public Member Functions π
stop_source(const stop_source &__other) noexceptβ copy constructor, copies from__other, and it'snoexceptbecause we don't do surprises here π«Άstop_source(std::nostopstate_t) noexceptβ the special one. hand itstd::nostopstate_tand you get astop_sourcethat has no associated stop-state at all. alsonoexceptβ¨stop_source(stop_source &&) noexcept=defaultβ move constructor,noexcept, and it's=default(the compiler handles it, she's lowkey built different) π¦stop_token get_token() const noexceptβ hands you astop_tokenso you can actually check in on the vibes.const,noexceptπstop_source & operator=(const stop_source &__other) noexceptβ copy assignment from__other.noexceptπstop_source & operator=(stop_source &&) noexcept=defaultβ move assignment,noexcept,=default, iconic βbool request_stop() const noexceptβ the main character move: make the stop request. returnsbool.constandnoexceptπbool stop_possible() const noexceptβ asks "is a stop even possible?" returnsbool.const,noexceptπbool stop_requested() const noexceptβ asks "has a stop been requested?" returnsbool.const,noexceptπ§void swap(stop_source &__other) noexceptβ swaps with__other, returnsvoid,noexceptπ
π«Ά Friends π«Ά
these are the ones in the group chat that get special access, no cap:
bool operator==(const stop_source &__a, const stop_source &__b) noexceptβ compares__aand__b, returnsbool,noexceptπvoid swap(stop_source &__lhs, stop_source &__rhs) noexceptβ swaps__lhsand__rhs, returnsvoid,noexceptβ¨
π₯ Detailed Description π₯
so, in full: std::stop_source is a type that allows a stop request to be made. periodt. π
that's the whole description, bestie. sometimes the icon doesn't need a whole paragraph. iykyk.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. so like, not a human, but the algorithm ate fr fr π
and that's the page!! this whole thing lives in the libstdc++ manual, std::stop_source(3), and yes the tools that built it were doing the most. go forth and request your stops responsibly, 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