Files
cppdraft_translate/cppdraft/stoptoken/never.md
2025-10-25 03:02:53 +03:00

1.0 KiB

[stoptoken.never]

32 Concurrency support library [thread]

32.3 Stop tokens [thread.stoptoken]

32.3.7 Class never_stop_token [stoptoken.never]

1

#

The class never_stop_token models the unstoppable_token concept.

It provides a stop token interface, but also provides static information that a stop is never possible nor requested.

namespace std {class never_stop_token {struct callback-type { // exposition onlyexplicit callback-type(never_stop_token, auto&&) noexcept {}}; public:templateusing callback_type = callback-type; static constexpr bool stop_requested() noexcept { return false; }static constexpr bool stop_possible() noexcept { return false; }bool operator==(const never_stop_token&) const = default; };}