[Overview][Constants][Types][Classes][Index] Reference for unit 'syncobjs' (#fcl)

TEventObject

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Event propagation object

Declaration

Source position: syncobjs.pp line 61

type TEventObject = class(THandleObject)

public

  constructor Create();

  

Create a new event object

  destructor destroy; override;

  

Clean up the event and release from memory

  procedure ResetEvent;

  

Reset the event

  procedure SetEvent;

  

Set the event

  function WaitFor();

  

Wait for the event to be set.

  property ManualReset: Boolean; [r]

  

Should the event be reset manually

end;

Inheritance

TEventObject

  

Event propagation object

|

THandleObject

  

Class encapsulating an operating system handle

|

TSynchroObject

  

Abstract synchronization object

|

TObject

Description

TEventObject encapsulates the BasicEvent implementation of the system unit in a class. The event can be used to notify other threads of a change in conditions. (in POSIX terms, this is a conditional variable). A thread that wishes to notify other threads creates an instance of TEventObject with a certain name, and posts events to it. Other threads that wish to be notified of these events should create their own instances of TEventObject with the same name, and wait for events to arrive.

See also

TCriticalSection

  

Critical section

The latest version of this document can be found at lazarus-ccr.sourceforge.net.