CriticalSection::CriticalSection Constructor
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at CriticalSection::CriticalSection Constructor.
Initializes a synchronization object that is similar to a mutex object, but can be used by only the threads of a single process.
Syntax
explicit CriticalSection(
ULONG spincount = 0
);
Parameters
spincount
The spin count for the critical section object. The default value is 0.
Remarks
For more information about crticial sections and spincounts, see the InitializeCriticalSectionAndSpinCount function in the Synchronization section of the Windows API documenation.
Requirements
Header: corewrappers.h
Namespace: Microsoft::WRL::Wrappers