The cancellation_token_source
class represents the ability to cancel some cancelable operation.
More...
#include <pplcancellation_token.h>
The cancellation_token_source
class represents the ability to cancel some cancelable operation.
Concurrency::cancellation_token_source::cancellation_token_source |
( |
| ) |
|
|
inline |
Constructs a new cancellation_token_source
. The source can be used to flag cancellation of some cancelable operation.
822 _M_Impl = new ::Concurrency::details::_CancellationTokenState;
_ImplType _M_Impl
Definition: pplcancellation_token.h:948
void _Assign(_ImplType _Impl)
Definition: pplcancellation_token.h:959
void _Move(_ImplType &_Impl)
Definition: pplcancellation_token.h:968
Concurrency::cancellation_token_source::~cancellation_token_source |
( |
| ) |
|
|
inline |
#define NULL
Definition: vcruntime.h:236
_ImplType _M_Impl
Definition: pplcancellation_token.h:948
long _Release()
Definition: pplcancellation_token.h:73
Concurrency::cancellation_token_source::cancellation_token_source |
( |
_ImplType |
_Impl | ) |
|
|
inlineprivate |
#define NULL
Definition: vcruntime.h:236
_ImplType _M_Impl
Definition: pplcancellation_token.h:948
static _CancellationTokenState * _None()
Definition: pplcancellation_token.h:332
long _Reference()
Definition: pplcancellation_token.h:62
void Concurrency::cancellation_token_source::_Assign |
( |
_ImplType |
_Impl | ) |
|
|
inlineprivate |
#define NULL
Definition: vcruntime.h:236
_ImplType _M_Impl
Definition: pplcancellation_token.h:948
void Concurrency::cancellation_token_source::_Clear |
( |
| ) |
|
|
inlineprivate |
#define NULL
Definition: vcruntime.h:236
_ImplType _M_Impl
Definition: pplcancellation_token.h:948
long _Release()
Definition: pplcancellation_token.h:73
cancellation_token_source()
Constructs a new cancellation_token_source. The source can be used to flag cancellation of some cance...
Definition: pplcancellation_token.h:820
_ImplType Concurrency::cancellation_token_source::_GetImpl |
( |
| ) |
const |
|
inline |
_ImplType _M_Impl
Definition: pplcancellation_token.h:948
void Concurrency::cancellation_token_source::_Move |
( |
_ImplType & |
_Impl | ) |
|
|
inlineprivate |
#define NULL
Definition: vcruntime.h:236
_ImplType _M_Impl
Definition: pplcancellation_token.h:948
void Concurrency::cancellation_token_source::cancel |
( |
| ) |
const |
|
inline |
Cancels the token. Any task_group
, structured_task_group
, or task
which utilizes the token will be canceled upon this call and throw an exception at the next interruption point.
void _Cancel()
Definition: pplcancellation_token.h:367
_ImplType _M_Impl
Definition: pplcancellation_token.h:948
Creates a cancellation_token_source
which is canceled when the provided token is canceled.
- Parameters
-
_Src | A token whose cancellation will cause cancellation of the returned token source. Note that the returned token source can also be canceled independently of the source contained in this parameter. |
- Returns
- A
cancellation_token_source
which is canceled when the token provided by the _Src parameter is canceled.
898 _Src.register_callback( [_NewSource](){ _NewSource.cancel(); } );
cancellation_token_source()
Constructs a new cancellation_token_source. The source can be used to flag cancellation of some cance...
Definition: pplcancellation_token.h:820
template<typename _Iter >
Creates a cancellation_token_source
which is canceled when one of a series of tokens represented by an STL iterator pair is canceled.
- Parameters
-
_Begin | The STL iterator corresponding to the beginning of the range of tokens to listen for cancellation of. |
_End | The STL iterator corresponding to the ending of the range of tokens to listen for cancellation of. |
- Returns
- A
cancellation_token_source
which is canceled when any of the tokens provided by the range described by the STL iterators contained in the _Begin and _End parameters is canceled.
920 for (_Iter _It = _Begin; _It != _End; ++_It)
922 _It->register_callback( [_NewSource](){ _NewSource.cancel(); } );
cancellation_token_source()
Constructs a new cancellation_token_source. The source can be used to flag cancellation of some cance...
Definition: pplcancellation_token.h:820
Returns a cancellation token associated with this source. The returned token can be polled for cancellation or provide a callback if and when cancellation occurs.
- Returns
- A cancellation token associated with this source.
882 return cancellation_token(
_M_Impl);
_ImplType _M_Impl
Definition: pplcancellation_token.h:948
bool operator==(const cancellation_token_source &_Src) const
Definition: pplcancellation_token.h:855
void _Assign(_ImplType _Impl)
Definition: pplcancellation_token.h:959
void _Clear()
Definition: pplcancellation_token.h:950
void _Clear()
Definition: pplcancellation_token.h:950
void _Move(_ImplType &_Impl)
Definition: pplcancellation_token.h:968
857 return _M_Impl == _Src._M_Impl;
_ImplType _M_Impl
Definition: pplcancellation_token.h:948
_ImplType Concurrency::cancellation_token_source::_M_Impl |
|
private |
The documentation for this class was generated from the following file: