Delen via


cancellation_token_source::create_linked_source Method

Creates a cancellation_token_source which is canceled when the provided token is canceled.

static cancellation_token_source create_linked_source(
   cancellation_token& _Src
);

template<
   typename _Iter
>
static cancellation_token_source create_linked_source(
   _Iter_Begin,
   _Iter_End
);

Parameters

  • _Iter

  • _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.

  • _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.

Return Value

A cancellation_token_source which is canceled when the token provided by the _Src parameter is canceled.

Requirements

Header: pplcancellation_token.h

Namespace: concurrency

See Also

Reference

cancellation_token_source Class