std::stop_token(3cxx)

πŸ’– NAME πŸ’–

std::stop_token β€” okay bestie, we’re in the 3cxx manual and this one is all about allowing testing whether a stop request has been made on a stop_source. No cap, that’s the whole name vibe ✨


✨ SYNOPSIS ✨

#include <stop_token>

🌸 Public Member Functions 🌸

  • stop_token (const stop_token &) noexcept=default β€” the copy constructor, defaulted and noexcept. Iconic, low-drama πŸ’…
  • stop_token (stop_token &&) noexcept=default β€” the move constructor, also defaulted and noexcept. We love a clean handoff 🫢
  • stop_token & operator= (const stop_token &) noexcept=default β€” copy assignment, defaulted and noexcept.
  • stop_token & operator= (stop_token &&) noexcept=default β€” move assignment, defaulted and noexcept.
  • bool stop_possible () const noexcept β€” a bool-returning member, const noexcept, taking no arguments. That’s the signature, bestie.
  • bool stop_requested () const noexcept β€” another bool-returning member, const noexcept, no arguments.
  • void swap (stop_token &__rhs) noexcept β€” member swap, takes stop_token &__rhs, returns void, and it’s noexcept.

🫢 Friends 🫢

  • bool operator== (const stop_token &__a, const stop_token &__b) β€” friend equality operator, returns bool, and takes two const stop_token& params named __a and __b.
  • template<typename _Callback > class stop_callback β€” friend template class, with _Callback as the template parameter.
  • class stop_source β€” friend class. Hi bestie πŸ‘‹
  • void swap (stop_token &__lhs, stop_token &__rhs) noexcept β€” free friend swap, takes stop_token &__lhs and stop_token &__rhs, returns void, and it’s noexcept.

πŸ¦‹ Detailed Description πŸ¦‹

Allow testing whether a stop request has been made on a stop_source. That’s the whole detailed description, and it ate πŸ’…βœ¨


πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for libstdc++ from the source code.


Cute sign-off time: the footer says libstdc++ for the source/version, and there’s no date listed, so I’m not inventing one bestie. Bye! πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from