Init
This commit is contained in:
27
cppdraft/stopsource/general.md
Normal file
27
cppdraft/stopsource/general.md
Normal file
@@ -0,0 +1,27 @@
|
||||
[stopsource.general]
|
||||
|
||||
# 32 Concurrency support library [[thread]](./#thread)
|
||||
|
||||
## 32.3 Stop tokens [[thread.stoptoken]](thread.stoptoken#stopsource.general)
|
||||
|
||||
### 32.3.5 Class stop_source [[stopsource]](stopsource#general)
|
||||
|
||||
#### 32.3.5.1 General [stopsource.general]
|
||||
|
||||
namespace std {class stop_source {public:// [[stopsource.cons]](stopsource.cons "32.3.5.2 Constructors, copy, and assignment"), constructors, copy, and assignment stop_source(); explicit stop_source(nostopstate_t) noexcept {}// [[stopsource.mem]](stopsource.mem "32.3.5.3 Member functions"), member functionsvoid swap(stop_source&) noexcept;
|
||||
|
||||
stop_token get_token() const noexcept; bool stop_possible() const noexcept; bool stop_requested() const noexcept; bool request_stop() noexcept; bool operator==(const stop_source& rhs) noexcept = default; private: shared_ptr<*unspecified*> *stop-state*; // *exposition only*};}
|
||||
|
||||
[1](#1)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L935)
|
||||
|
||||
*stop-state* refers to the stop_source's associated stop state[.](#1.sentence-1)
|
||||
|
||||
A stop_source object is disengaged when *stop-state* is empty[.](#1.sentence-2)
|
||||
|
||||
[2](#2)
|
||||
|
||||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L939)
|
||||
|
||||
stop_source models[*stoppable-source*](stoptoken.concepts#concept:stoppable-source "32.3.3 Stop token concepts [stoptoken.concepts]"),[copyable](concepts.object#concept:copyable "18.6 Object concepts [concepts.object]"),[equality_comparable](concept.equalitycomparable#concept:equality_comparable "18.5.4 Concept equality_comparable [concept.equalitycomparable]"), and[swappable](concept.swappable#concept:swappable "18.4.9 Concept swappable [concept.swappable]")[.](#2.sentence-1)
|
||||
Reference in New Issue
Block a user