21 lines
1.0 KiB
Markdown
21 lines
1.0 KiB
Markdown
[stoptoken.never]
|
||
|
||
# 32 Concurrency support library [[thread]](./#thread)
|
||
|
||
## 32.3 Stop tokens [[thread.stoptoken]](thread.stoptoken#stoptoken.never)
|
||
|
||
### 32.3.7 Class never_stop_token [stoptoken.never]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L1130)
|
||
|
||
The class never_stop_token models
|
||
the [unstoppable_token](stoptoken.concepts#concept:unstoppable_token "32.3.3 Stop token concepts [stoptoken.concepts]") concept[.](#1.sentence-1)
|
||
|
||
It provides a stop token interface,
|
||
but also provides static information
|
||
that a stop is never possible nor requested[.](#1.sentence-2)
|
||
|
||
namespace std {class never_stop_token {struct *callback-type* { // *exposition only*explicit *callback-type*(never_stop_token, auto&&) noexcept {}}; public:template<class>using 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; };}
|