VTK  9.1.0
Public Member Functions | Protected Attributes | List of all members
vtkSimpleCriticalSection Class Reference

Critical section locking class. More...

#include <vtkSimpleCriticalSection.h>

Public Member Functions

 vtkSimpleCriticalSection ()
 
 vtkSimpleCriticalSection (int isLocked)
 
virtual ~vtkSimpleCriticalSection ()
 
void Init ()
 
void Lock ()
 Lock the vtkCriticalSection. More...
 
void Unlock ()
 Unlock the vtkCriticalSection. More...
 

Protected Attributes

vtkCritSecType CritSec
 

Detailed Description

Critical section locking class.

vtkCriticalSection allows the locking of variables which are accessed through different threads. This header file also defines vtkSimpleCriticalSection which is not a subclass of vtkObject. The API is identical to that of vtkMutexLock, and the behavior is identical as well, except on Windows 9x/NT platforms. The only difference on these platforms is that vtkMutexLock is more flexible, in that it works across processes as well as across threads, but also costs more, in that it evokes a 600-cycle x86 ring transition. The vtkCriticalSection provides a higher-performance equivalent (on Windows) but won't work across processes. Since it is unclear how, in vtk, an object at the vtk level can be shared across processes in the first place, one should use vtkCriticalSection unless one has a very good reason to use vtkMutexLock. If higher-performance equivalents for non-Windows platforms (Irix, SunOS, etc) are discovered, they should replace the implementations in this class

Definition at line 61 of file vtkSimpleCriticalSection.h.

Constructor & Destructor Documentation

◆ vtkSimpleCriticalSection() [1/2]

vtkSimpleCriticalSection::vtkSimpleCriticalSection ( )
inline

Definition at line 66 of file vtkSimpleCriticalSection.h.

◆ vtkSimpleCriticalSection() [2/2]

vtkSimpleCriticalSection::vtkSimpleCriticalSection ( int  isLocked)
inline

Definition at line 68 of file vtkSimpleCriticalSection.h.

◆ ~vtkSimpleCriticalSection()

virtual vtkSimpleCriticalSection::~vtkSimpleCriticalSection ( )
virtual

Member Function Documentation

◆ Init()

void vtkSimpleCriticalSection::Init ( )

◆ Lock()

void vtkSimpleCriticalSection::Lock ( )

Lock the vtkCriticalSection.

◆ Unlock()

void vtkSimpleCriticalSection::Unlock ( )

Unlock the vtkCriticalSection.

Member Data Documentation

◆ CritSec

vtkCritSecType vtkSimpleCriticalSection::CritSec
protected

Definition at line 92 of file vtkSimpleCriticalSection.h.


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