32
Concurrency support library
[thread]
32.3
Stop tokens
[thread.stoptoken]
32.3.2
Header
<stop_
token>
synopsis
[thread.stoptoken.syn]
🔗
namespace
std
{
//
[stoptoken.
concepts]
, stop token concepts
template
<
class
CallbackFn,
class
Token,
class
Initializer
=
CallbackFn
>
concept
stoppable-callback-for
=
see below
;
//
exposition only
template
<
class
Token
>
concept
stoppable_
token
=
see below
;
template
<
class
Token
>
concept
unstoppable_
token
=
see below
;
template
<
class
Source
>
concept
stoppable-source
=
see below
;
//
exposition only
//
[stoptoken]
, class
stop_
token
class
stop_token;
//
[stopsource]
, class
stop_
source
class
stop_source;
// no-shared-stop-state indicator
struct
nostopstate_t
{
explicit
nostopstate_t
(
)
=
default
;
}
;
inline
constexpr
nostopstate_t nostopstate
{
}
;
//
[stopcallback]
, class template
stop_
callback
template
<
class
Callback
>
class
stop_callback;
//
[stoptoken.
never]
, class
never_
stop_
token
class
never_stop_token;
//
[stoptoken.
inplace]
, class
inplace_
stop_
token
class
inplace_stop_token;
//
[stopsource.
inplace]
, class
inplace_
stop_
source
class
inplace_stop_source;
//
[stopcallback.
inplace]
, class template
inplace_
stop_
callback
template
<
class
CallbackFn
>
class
inplace_stop_callback;
template
<
class
T,
class
CallbackFn
>
using
stop_callback_for_t
=
T
::
template
callback_type
<
CallbackFn
>
;
}