MLIB
Loading...
Searching...
No Matches
mlib::criticalsection Class Reference

Lightweight inter-thread synchronization. More...

#include <critsect.h>

Public Member Functions

 criticalsection ()
 Initializes critical section object.
 
 ~criticalsection ()
 Deletes the critical section object.
 
virtual void enter ()
 Enter critical section.
 
virtual bool try_enter ()
 Return true if critical section was entered.
 
virtual void leave ()
 Leave critical section.
 

Detailed Description

Lightweight inter-thread synchronization.

Only one thread at a time can enter a critical section. Critical sections must be leaved as many times as they were entered.


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