Sign in Join
FPDoc Onlineexperiment

TWaitableSection record

In unit LazCollections

Protects a section of code in multi-threaded applications.

Declaration

pascal
TWaitableSection = record

Description

TWaitableSection is an advanced record type used to serialize access to a section of code in a multi-threaded application. It uses a pointer to a RTL event, accessible to all interested threads, to protect its resources. When the event is set by an acquiring thread, other threads must wait until the event is reset.

TWaitableSection is used in the implementation of the Dwarf debugger for the Lazarus IDE.

See also

Methods

GetCachedOrNewEventpublicGets or creates the RTL event for the synchronization object.
FreeOrCacheEventpublicCaches or Frees the RTL event for the synchronization object.
EnterOrWaitpublicEnters the protected section, or waits until it is available.
LeavepublicLeaves the protected section.

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.