tmp/tmpqn38q29n/{from.md → to.md}
RENAMED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
### Class template `stop_callback` <a id="stopcallback">[[stopcallback]]</a>
|
| 2 |
|
|
|
|
|
|
|
| 3 |
``` cpp
|
| 4 |
namespace std {
|
| 5 |
template<class Callback>
|
| 6 |
class stop_callback {
|
| 7 |
public:
|
|
@@ -62,15 +64,15 @@ before the constructor returns. Otherwise, if `st` has ownership of a
|
|
| 62 |
stop state, acquires shared ownership of that stop state and registers
|
| 63 |
the callback with that stop state such that
|
| 64 |
`std::forward<Callback>(callback)()` is evaluated by the first call to
|
| 65 |
`request_stop()` on an associated `stop_source`.
|
| 66 |
|
| 67 |
-
*Remarks:* If evaluating `std::forward<Callback>(callback)()` exits via
|
| 68 |
-
an exception, then `terminate` is called [[except.terminate]].
|
| 69 |
-
|
| 70 |
*Throws:* Any exception thrown by the initialization of `callback`.
|
| 71 |
|
|
|
|
|
|
|
|
|
|
| 72 |
``` cpp
|
| 73 |
~stop_callback();
|
| 74 |
```
|
| 75 |
|
| 76 |
*Effects:* Unregisters the callback from the owned stop state, if any.
|
|
|
|
| 1 |
### Class template `stop_callback` <a id="stopcallback">[[stopcallback]]</a>
|
| 2 |
|
| 3 |
+
#### General <a id="stopcallback.general">[[stopcallback.general]]</a>
|
| 4 |
+
|
| 5 |
``` cpp
|
| 6 |
namespace std {
|
| 7 |
template<class Callback>
|
| 8 |
class stop_callback {
|
| 9 |
public:
|
|
|
|
| 64 |
stop state, acquires shared ownership of that stop state and registers
|
| 65 |
the callback with that stop state such that
|
| 66 |
`std::forward<Callback>(callback)()` is evaluated by the first call to
|
| 67 |
`request_stop()` on an associated `stop_source`.
|
| 68 |
|
|
|
|
|
|
|
|
|
|
| 69 |
*Throws:* Any exception thrown by the initialization of `callback`.
|
| 70 |
|
| 71 |
+
*Remarks:* If evaluating `std::forward<Callback>(callback)()` exits via
|
| 72 |
+
an exception, then `terminate` is invoked [[except.terminate]].
|
| 73 |
+
|
| 74 |
``` cpp
|
| 75 |
~stop_callback();
|
| 76 |
```
|
| 77 |
|
| 78 |
*Effects:* Unregisters the callback from the owned stop state, if any.
|