Wrapper class for a critical section. More...
#include <SCriticalSection.h>
Public Member Functions | |
SCriticalSection () | |
Constructor. Initializes a new critical section. | |
virtual | ~SCriticalSection () |
Destructor. Destroys the critical section. | |
void | Enter () |
Enters the critical section. | |
void | Leave () |
Leaves the critical section. | |
Protected Attributes | |
SCriticalSectionImpl * | m_cs |
Wrapper class for a critical section.
This class provides methods to enter and leave a critical section, ensuring thread safety.
Definition at line 30 of file SCriticalSection.h.
SCriticalSection::SCriticalSection | ( | ) |
Constructor. Initializes a new critical section.
Definition at line 26 of file SCriticalSection.cpp.
|
virtual |
Destructor. Destroys the critical section.
Definition at line 30 of file SCriticalSection.cpp.
void SCriticalSection::Enter | ( | ) |
Enters the critical section.
This method blocks the calling thread until the critical section is available.
Definition at line 35 of file SCriticalSection.cpp.
void SCriticalSection::Leave | ( | ) |
Leaves the critical section.
This method releases the critical section, allowing other threads to enter.
Definition at line 40 of file SCriticalSection.cpp.
|
protected |
Pointer to the critical section implementation.
Definition at line 58 of file SCriticalSection.h.