Sign in Join
FPDoc Onlineexperiment

TWidgetSet.InitializeCriticalSection procedure

Member of TWidgetSetpublicIn unit InterfaceBase

Initializes a Critical Section object.

Declaration

pascal
procedure InitializeCriticalSection(var CritSection: TCriticalSection)
 ; virtual

Arguments

CritSection

The critical section object.

Description

Critical sections are thread synchronization elements, typically used to prevent concurrent access to a shared resource.

Only one thread can own a critical section at the same time, other requests (to enter the same critical section) are delayed until the owner has left the critical section.

The TCriticalSection type is platform specific. It is treated like a Handle.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.