OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TCriticalSection::TLock Class Reference

This nested class handles locking and unlocking critical sections. More...

#include <owl/thread.h>

Inheritance diagram for owl::TCriticalSection::TLock:
owl::TStaticSync< T >::TLock owl::TSync::TLock

Public Member Functions

 TLock (const TCriticalSection &)
 Use system call to lock the CRITICAL_SECTION object.
 
 ~TLock ()
 Use system call to unlock the CRITICAL_SECTION object.
 

Detailed Description

This nested class handles locking and unlocking critical sections.

Only one thread of execution will be allowed to execute the critical code inside function f at any one time.

void f()
{
// critical processing here
}
Lightweight intra-process thread synchronization.
Definition thread.h:308
TLock Lock
For compatibility with old T-less typename.
Definition thread.h:334

Definition at line 326 of file thread.h.

Constructor & Destructor Documentation

◆ TLock()

owl::TCriticalSection::TLock::TLock ( const TCriticalSection & sec)
inline

Use system call to lock the CRITICAL_SECTION object.

Requests a lock on the TCriticalSection object. If no other Lock object holds a lock on that TCriticalSection object, the lock is allowed and execution continues. If another Lock object holds a lock on that object, the requesting thread is blocked until the lock is released.

Definition at line 1275 of file thread.h.

References CONST_CAST.

◆ ~TLock()

owl::TCriticalSection::TLock::~TLock ( )
inline

Use system call to unlock the CRITICAL_SECTION object.

Definition at line 1285 of file thread.h.

References CONST_CAST.


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