|
491 | 491 | are called when a stop request is first made
|
492 | 492 | by any associated \exposconcept{stoppable-source} object.
|
493 | 493 |
|
494 |
| -\pnum |
495 |
| -Calls to the functions \tcode{request_stop}, \tcode{stop_requested}, |
496 |
| -and \tcode{stop_possible} |
497 |
| -do not introduce data races. |
498 |
| -A call to \tcode{request_stop} that returns \tcode{true} |
499 |
| -synchronizes with a call to \tcode{stop_requested} |
500 |
| -on an associated \tcode{stop_token} or \tcode{stop_source} object |
501 |
| -that returns \tcode{true}. |
502 |
| -Registration of a callback synchronizes with the invocation of that callback. |
503 |
| - |
504 | 494 | \pnum
|
505 | 495 | The types \tcode{stop_source} and \tcode{stop_token} and
|
506 | 496 | the class template \tcode{stop_callback} implement
|
|
526 | 516 | namespace std {
|
527 | 517 | // \ref{stoptoken.concepts}, stop token concepts
|
528 | 518 | template<class CallbackFn, class Token, class Initializer = CallbackFn>
|
529 |
| - concept @\exposconcept{stoppable-callback-for}@ = @\seebelow@; // \expos |
| 519 | + concept @\exposconcept{stoppable-callback-for}@ = @\seebelow@; // \expos |
530 | 520 |
|
531 | 521 | template<class Token>
|
532 | 522 | concept @\libconcept{stoppable_token}@ = @\seebelow@;
|
|
535 | 525 | concept @\libconcept{unstoppable_token}@ = @\seebelow@;
|
536 | 526 |
|
537 | 527 | template<class Source>
|
538 |
| - concept @\exposconcept{stoppable-source}@ = @\seebelow@; // \expos |
| 528 | + concept @\exposconcept{stoppable-source}@ = @\seebelow@; // \expos |
539 | 529 |
|
540 | 530 | // \ref{stoptoken}, class \tcode{stop_token}
|
541 | 531 | class stop_token;
|
|
578 | 568 | checks for a callback compatible with a given \tcode{Token} type.
|
579 | 569 | \begin{codeblock}
|
580 | 570 | template<class CallbackFn, class Token, class Initializer = CallbackFn>
|
581 |
| - concept @\defexposconcept{stoppable-callback-for}@ = // \expos |
| 571 | + concept @\defexposconcept{stoppable-callback-for}@ = // \expos |
582 | 572 | @\libconcept{invocable}@<CallbackFn> &&
|
583 | 573 | @\libconcept{constructible_from}@<CallbackFn, Initializer> &&
|
584 | 574 | requires { typename stop_callback_for_t<Token, CallbackFn>; } &&
|
|
878 | 868 | \begin{itemdescr}
|
879 | 869 | \pnum
|
880 | 870 | \effects
|
881 |
| -Equivalent to: \tcode{\exposid{stop-state}.swap(rhs.\exposid{stop-state})}. |
| 871 | +Equivalent to: |
| 872 | +\begin{codeblock} |
| 873 | +@\exposid{stop-state}@.swap(rhs.@\exposid{stop-state}@); |
| 874 | +\end{codeblock} |
882 | 875 | \end{itemdescr}
|
883 | 876 |
|
884 | 877 | \indexlibrarymember{stop_requested}{stop_token}%
|
|
980 | 973 | \begin{itemdescr}
|
981 | 974 | \pnum
|
982 | 975 | \effects
|
983 |
| -Equivalent to \tcode{\exposid{stop-state}.swap(rhs.\exposid{stop-state})}. |
| 976 | +Equivalent to: |
| 977 | +\begin{codeblock} |
| 978 | +@\exposid{stop-state}@.swap(rhs.@\exposid{stop-state}@); |
| 979 | +\end{codeblock} |
984 | 980 | \end{itemdescr}
|
985 | 981 |
|
986 | 982 | \indexlibrarymember{get_token}{stop_source}%
|
|
1005 | 1001 | \begin{itemdescr}
|
1006 | 1002 | \pnum
|
1007 | 1003 | \returns
|
1008 |
| -\tcode{\exposid{stop-state} != nullptr}. |
| 1004 | +\tcode{\exposidnc{stop-state} != nullptr}. |
1009 | 1005 | \end{itemdescr}
|
1010 | 1006 |
|
1011 | 1007 | \indexlibrarymember{stop_requested}{stop_source}%
|
|
1093 | 1089 | \indexlibraryctor{stop_callback}%
|
1094 | 1090 | \begin{itemdecl}
|
1095 | 1091 | template<class Initializer>
|
1096 |
| -explicit stop_callback(const stop_token& st, Initializer&& init) |
1097 |
| - noexcept(is_nothrow_constructible_v<CallbackFn, Initializer>); |
| 1092 | + explicit stop_callback(const stop_token& st, Initializer&& init) |
| 1093 | + noexcept(is_nothrow_constructible_v<CallbackFn, Initializer>); |
| 1094 | + |
1098 | 1095 | template<class Initializer>
|
1099 |
| -explicit stop_callback(stop_token&& st, Initializer&& init) |
1100 |
| - noexcept(is_nothrow_constructible_v<CallbackFn, Initializer>); |
| 1096 | + explicit stop_callback(stop_token&& st, Initializer&& init) |
| 1097 | + noexcept(is_nothrow_constructible_v<CallbackFn, Initializer>); |
1101 | 1098 | \end{itemdecl}
|
1102 | 1099 |
|
1103 | 1100 | \begin{itemdescr}
|
|
1223 | 1220 | \begin{itemdescr}
|
1224 | 1221 | \pnum
|
1225 | 1222 | \returns
|
1226 |
| -\tcode{\exposid{stop-source} != nullptr}. |
| 1223 | +\tcode{\exposidnc{stop-source} != nullptr}. |
1227 | 1224 |
|
1228 | 1225 | \pnum
|
1229 | 1226 | \begin{note}
|
|
0 commit comments