共用方式為


critical_section::scoped_lock Class

An exception safe RAII wrapper for a critical_section object.

class scoped_lock;

Members

Public Constructors

Name

Description

critical_section::scoped_lock::scoped_lock Constructor

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.

critical_section::scoped_lock::~scoped_lock Destructor

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

Inheritance Hierarchy

scoped_lock

Requirements

Header: concrt.h

Namespace: concurrency

See Also

Reference

critical_section Class