#include <CriticalSection.h++>


Public Member Functions | |
| CriticalSection () throw () | |
| Constructor. | |
| ~CriticalSection () throw () | |
| Destructor. | |
| void | enter () throw () |
| Enter the critical section, blocking if necessary. | |
| void | lock () throw () |
| Equivalent to enter(). | |
| bool | tryEnter () throw () |
| Try to enter the critical section, returning immediately if it could not be entered. | |
| void | leave () throw () |
| Leave the critical section. | |
| void | unlock () throw () |
| Equivalent to leave(). | |
Only one thread may be "within" a critical section at any one time.
Critical sections are recursive, so a thread may re-enter a critical section that it has already entered. However, the thread must leave the critical section the same number of times that it has entered it in order to release it.
| CriticalSection | ( | ) | throw () |
Constructor.
| ~CriticalSection | ( | ) | throw () |
Destructor.
It is the calling code's responsibility to ensure that a CriticalSection is deleted only when no thread is within it.
| void enter | ( | ) | throw () |
Enter the critical section, blocking if necessary.
| void leave | ( | ) | throw () |
Leave the critical section.
| bool tryEnter | ( | ) | throw () |
Try to enter the critical section, returning immediately if it could not be entered.
1.5.9