Indy 9
TIdLocalEvent
Hierarchy, Methods, See Also, Unit: IdGlobal
Event type signalled for thread-based notification messages.
TIdLocalEvent = class(TEvent)
Unit
IdGlobal
Description
TIdLocalEvent is a TEvent descendant that specifies the event type, signalled to the global thread-based notication list when there are pending synchronization requests for an Indy thread instance.

TIdLocalEvent is created using the default Event attributes to allow inheritance of the security attributes of the process that creates the event. TIdLocalEvent can be automatically reset when the single thread that waits on the signal is released. TIdLocalEvent is not created to access an existing named TEvent object instance. TIdLocalEvent is also created with the initial event signal state cleared.


TIdLocalEvent.Create
TIdLocalEvent
Constructor for the object instance.
constructor Create(const AInitialState: Boolean = False; const AManualReset: Boolean = False); reintroduce;
Parameters
const AInitialState: Boolean = False
Default value is False.
const AManualReset: Boolean = False
Default value is False.
Description
Create is the constructor for the object instance. Create calls the inherited Create method using the input parameters to initialize the object instance.

TIdLocalEvent is created using the default Event attributes to allow inheritance of the security attributes of the process that creates the event.

When AInitialState is False, the TIdLocalEvent is created with the initial event signal state cleared (not set).

When AManualReset is False, the TIdLocalEvent can be automatically reset when the single thread that waits on the signal is released. It does not require a call to ResetEvent.

TIdLocalEvent is not created to access an existing named TEvent object instance.


TIdLocalEvent.WaitFor
TIdLocalEvent
Waits until another thread turns on the signal of the event object.
function WaitFor: TWaitResult; overload;
Return Value
TWaitResult - The resulting signal state.
Description
WaitFor is a TWaitResult function that waits until the signal of the event object is turned on. WaitFor will indefinitely until the event is signalled. WaitFor returns one of the following TWaitResult values:

  • wrSignaled - The signal of the event object was set.

  • wrAbandoned - The event object was destroyed before the event was signalled.

  • wrError - An error occurred while waiting.

Check the LastError property for an error code giving more information.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.