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

An exception safe RAII wrapper for a critical_section object. More...

#include <concrt.h>

Public Member Functions

_CONCRTIMP scoped_lock (critical_section &_Critical_section)
 Constructs a scoped_lock object and acquires the critical_section object passed in the _Critical_section parameter. If the critical section is held by another thread, this call will block. More...
 
_CONCRTIMP ~scoped_lock ()
 Destroys a scoped_lock object and releases the critical section supplied in its constructor. More...
 

Private Member Functions

 scoped_lock (const scoped_lock &)
 
scoped_lock const & operator= (const scoped_lock &)
 

Private Attributes

critical_section_M_critical_section
 
_CONCRT_BUFFER _M_node [(4 *sizeof(void *)+2 *sizeof(unsigned int)+sizeof(_CONCRT_BUFFER)-1)/sizeof(_CONCRT_BUFFER)]
 

Detailed Description

An exception safe RAII wrapper for a critical_section object.

Constructor & Destructor Documentation

_CONCRTIMP Concurrency::critical_section::scoped_lock::scoped_lock ( critical_section _Critical_section)
explicit

Constructs a scoped_lock object and acquires the critical_section object passed in the _Critical_section parameter. If the critical section is held by another thread, this call will block.

Parameters
_Critical_sectionThe critical section to lock.
See also
critical_section Class
_CONCRTIMP Concurrency::critical_section::scoped_lock::~scoped_lock ( )

Destroys a scoped_lock object and releases the critical section supplied in its constructor.

See also
critical_section Class
Concurrency::critical_section::scoped_lock::scoped_lock ( const scoped_lock )
private

Member Function Documentation

scoped_lock const& Concurrency::critical_section::scoped_lock::operator= ( const scoped_lock )
private

Member Data Documentation

critical_section& Concurrency::critical_section::scoped_lock::_M_critical_section
private
_CONCRT_BUFFER Concurrency::critical_section::scoped_lock::_M_node[(4 *sizeof(void *)+2 *sizeof(unsigned int)+sizeof(_CONCRT_BUFFER)-1)/sizeof(_CONCRT_BUFFER)]
private

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