STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Attributes | List of all members
Concurrency::details::_Cancellation_beacon Class Reference

A cancellation beacon is a flag which can be polled in an inlinable fashion using the is_signaled method in lieu of polling on the more expensive non inlinable is_current_task_group_canceling method. More...

#include <concrt.h>

Public Member Functions

_CONCRTIMP _Cancellation_beacon ()
 
_CONCRTIMP ~_Cancellation_beacon ()
 
bool _Is_signaled () const
 
_CONCRTIMP bool _Confirm_cancel ()
 
void _Raise ()
 
void _Lower ()
 

Private Attributes

_Beacon_reference_M_pRef
 

Detailed Description

A cancellation beacon is a flag which can be polled in an inlinable fashion using the is_signaled method in lieu of polling on the more expensive non inlinable is_current_task_group_canceling method.

Cancellation beacons can be used only in the same way as structured_task_group and _StructuredTaskCollection. They are intended as stack based objects utilized in strictly nested RAII fashion. A beacon can NOT be passed to another thread or allocated on the heap.

Constructor & Destructor Documentation

_CONCRTIMP Concurrency::details::_Cancellation_beacon::_Cancellation_beacon ( )
_CONCRTIMP Concurrency::details::_Cancellation_beacon::~_Cancellation_beacon ( )

Member Function Documentation

_CONCRTIMP bool Concurrency::details::_Cancellation_beacon::_Confirm_cancel ( )
bool Concurrency::details::_Cancellation_beacon::_Is_signaled ( ) const
inline
5308  {
5309  return (_M_pRef->_M_signals != 0);
5310  }
volatile long _M_signals
Definition: concrt.h:5287
_Beacon_reference * _M_pRef
Definition: concrt.h:5328
void Concurrency::details::_Cancellation_beacon::_Lower ( )
inline
5322  {
5324  }
volatile long _M_signals
Definition: concrt.h:5287
_Beacon_reference * _M_pRef
Definition: concrt.h:5328
long __cdecl _InterlockedDecrement(long volatile *)
void Concurrency::details::_Cancellation_beacon::_Raise ( )
inline
5317  {
5319  }
volatile long _M_signals
Definition: concrt.h:5287
_Beacon_reference * _M_pRef
Definition: concrt.h:5328
long __cdecl _InterlockedIncrement(long volatile *)

Member Data Documentation

_Beacon_reference* Concurrency::details::_Cancellation_beacon::_M_pRef
private

The documentation for this class was generated from the following file: