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

RAII wrapper used to maintain and limit ppltask maximum inline schedule depth. This class will keep a reference to the depth slot on current context. More...

#include <concrt.h>

Public Member Functions

 _StackGuard ()
 
 ~_StackGuard ()
 
bool _ShouldInline (_TaskInliningMode _InliningMode) const
 

Private Member Functions

_StackGuardoperator= (const _StackGuard &)
 

Static Private Member Functions

static _CRTIMP size_t &__cdecl _GetCurrentInlineDepth ()
 Return a reference to the ppltask inline schedule depth slot on current context The inline depth will be set to 0 when the context is first initialized, and the caller is responsible to maintain that depth. More...
 

Private Attributes

size_t_Depth
 

Detailed Description

RAII wrapper used to maintain and limit ppltask maximum inline schedule depth. This class will keep a reference to the depth slot on current context.

Constructor & Destructor Documentation

Concurrency::details::_StackGuard::_StackGuard ( )
inline
5288  {
5289  // _Depth is the reference to the depth slot on context.
5290  ++_Depth;
5291  }
static _CRTIMP size_t &__cdecl _GetCurrentInlineDepth()
Return a reference to the ppltask inline schedule depth slot on current context The inline depth will...
size_t & _Depth
Definition: concrt.h:5305
Concurrency::details::_StackGuard::~_StackGuard ( )
inline
5293  {
5294  // _Depth is the reference to the depth slot on context.
5295  --_Depth;
5296  }
size_t & _Depth
Definition: concrt.h:5305

Member Function Documentation

static _CRTIMP size_t& __cdecl Concurrency::details::_StackGuard::_GetCurrentInlineDepth ( )
staticprivate

Return a reference to the ppltask inline schedule depth slot on current context The inline depth will be set to 0 when the context is first initialized, and the caller is responsible to maintain that depth.

bool Concurrency::details::_StackGuard::_ShouldInline ( _TaskInliningMode  _InliningMode) const
inline
5299  {
5300  // As _TaskInliningMode is defined as inlining threshold, we can directly convert
5301  // it into size_t, and compare with current context inlining depth.
5302  return _Depth <= static_cast<size_t>(_InliningMode);
5303  }
_StackGuard& Concurrency::details::_StackGuard::operator= ( const _StackGuard )
private

Member Data Documentation

size_t& Concurrency::details::_StackGuard::_Depth
private

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