TLightweightEvent = class(TSynchroObject)
class PASCALIMPLEMENTATION TLightweightEvent : public TSynchroObject
Represents a lightweight mechanism for inter-thread signaling.
Threads can use TLightweightEvent to synchronize their activity. The execution of threads is usually not perfectly independent. A thread may have to wait until another thread reaches a specific point of execution.
TLightweightEvent implements a manual reset event using only atomic operations.
TLightweightEvent can have the following states:
|Non-signaled||Threads cannot run independently. A thread that calls WaitFor spends a number of cycles in spin loops and can be blocked at kernel level.|
|Signaled||Threads can run independently.|
TLightweightEvent should be used in cases where the non-signaled intervals are relatively short. If TLightweightEvent is used in cases where most of the calls to WaitFor block the calling thread, then the performance may be slightly below that of TSimpleEvent.