critical_section Class

A non-reentrant mutex which is explicitly aware of the Concurrency Runtime.

class critical_section;

Public Typedefs

Name

Description

native_handle_type

A reference to a critical_section object.

Public Classes

Name

Description

critical_section::scoped_lock Class

An exception safe RAII wrapper for a critical_section object.

Public Constructors

Name

Description

critical_section::critical_section Constructor

Constructs a new critical section.

critical_section::~critical_section Destructor

Destroys a critical section.

Public Methods

Name

Description

critical_section::lock Method

Acquires this critical section.

critical_section::native_handle Method

Returns a platform specific native handle, if one exists.

critical_section::try_lock Method

Tries to acquire the lock without blocking.

critical_section::unlock Method

Unlocks the critical section.

For more information, see Synchronization Data Structures.

Header: concrt.h

Namespace: Concurrency

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft