From Jason Turner

[stopsource]

Diff to HTML by rtfpessoa

tmp/tmp_vnuy0q7/{from.md → to.md} RENAMED
@@ -1,11 +1,13 @@
1
  ### Class `stop_source` <a id="stopsource">[[stopsource]]</a>
2
 
 
 
3
  The class `stop_source` implements the semantics of making a stop
4
  request. A stop request made on a `stop_source` object is visible to all
5
- associated `stop_source` and `stop_token` ([[stoptoken]]) objects. Once
6
- a stop request has been made it cannot be withdrawn (a subsequent stop
7
  request has no effect).
8
 
9
  ``` cpp
10
  namespace std {
11
  // no-shared-stop-state indicator
@@ -49,12 +51,11 @@ stop_source();
49
  *Effects:* Initialises `*this` to have ownership of a new stop state.
50
 
51
  *Ensures:* `stop_possible()` is `true` and `stop_requested()` is
52
  `false`.
53
 
54
- *Throws:* `bad_alloc` if memory could not be allocated for the stop
55
- state.
56
 
57
  ``` cpp
58
  explicit stop_source(nostopstate_t) noexcept;
59
  ```
60
 
@@ -139,11 +140,11 @@ bool request_stop() noexcept;
139
  has received a stop request, and if not, makes a stop request. The
140
  determination and making of the stop request are an atomic
141
  read-modify-write operation [[intro.races]]. If the request was made,
142
  the callbacks registered by associated `stop_callback` objects are
143
  synchronously called. If an invocation of a callback exits via an
144
- exception then `terminate` is called [[except.terminate]].
145
 
146
  [*Note 1*: A stop request includes notifying all condition variables of
147
  type `condition_variable_any` temporarily registered during an
148
  interruptible wait [[thread.condvarany.intwait]]. — *end note*]
149
 
 
1
  ### Class `stop_source` <a id="stopsource">[[stopsource]]</a>
2
 
3
+ #### General <a id="stopsource.general">[[stopsource.general]]</a>
4
+
5
  The class `stop_source` implements the semantics of making a stop
6
  request. A stop request made on a `stop_source` object is visible to all
7
+ associated `stop_source` and `stop_token` [[stoptoken]] objects. Once a
8
+ stop request has been made it cannot be withdrawn (a subsequent stop
9
  request has no effect).
10
 
11
  ``` cpp
12
  namespace std {
13
  // no-shared-stop-state indicator
 
51
  *Effects:* Initialises `*this` to have ownership of a new stop state.
52
 
53
  *Ensures:* `stop_possible()` is `true` and `stop_requested()` is
54
  `false`.
55
 
56
+ *Throws:* `bad_alloc` if memory cannot be allocated for the stop state.
 
57
 
58
  ``` cpp
59
  explicit stop_source(nostopstate_t) noexcept;
60
  ```
61
 
 
140
  has received a stop request, and if not, makes a stop request. The
141
  determination and making of the stop request are an atomic
142
  read-modify-write operation [[intro.races]]. If the request was made,
143
  the callbacks registered by associated `stop_callback` objects are
144
  synchronously called. If an invocation of a callback exits via an
145
+ exception then `terminate` is invoked [[except.terminate]].
146
 
147
  [*Note 1*: A stop request includes notifying all condition variables of
148
  type `condition_variable_any` temporarily registered during an
149
  interruptible wait [[thread.condvarany.intwait]]. — *end note*]
150