Data.DBXPlatform.TDBXSemaphore

From RAD Studio API Documentation
Jump to: navigation, search

System.SyncObjs.TSemaphoreSystem.SyncObjs.THandleObjectSystem.SyncObjs.TSynchroObjectSystem.TObjectTDBXSemaphore
[–] Properties
Type: class
Visibility: public
Source:
Data.DBXPlatform.pas
Data.DBXPlatform.hpp
Unit: Data.DBXPlatform
Parent: Data.DBXPlatform

Delphi

TDBXSemaphore = class(TSemaphore)

C++

class PASCALIMPLEMENTATION TDBXSemaphore : public System::Syncobjs::TSemaphore

Description

Synchronization primitive that manages multiple parallel thread executions for sharing a common resource.

In dbExpress, TDBXSemaphore is a synchronization primitive that manages multiple parallel thread executions for sharing a common resource.

To each dbExpress semaphore there is an associated counter variable. This variable gives the shared resource's number of units that are currently free. The counter is decremented whenever a thread locks the semaphore and incremented when a thread releases the semaphore.

If a thread tries to lock the semaphore and the counter value is nil, then the thread adds to the semaphore waiting queue. The first thread in the semaphore queue locks the semaphore as soon as the counter value is nonzero.

See Also