Show: Delphi C++
Display Preferences

System.Classes.WakeMainThread

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

WakeMainThread: TNotifyEvent = nil;

C++

extern DELPHI_PACKAGE TNotifyEvent WakeMainThread;

Properties

Type Visibility Source Unit Parent
variable public
System.Classes.pas
System.Classes.hpp
System.Classes System.Classes

Description

Represents a method (event handler) that is forced into the main thread's queue.

Assign a method to WakeMainThread before calling a thread's Synchronize method. When you call a thread's Synchronize method, it calls the method assigned to WakeMainThread once it has obtained a lock on the main GUI thread. This allows other threads to quickly synchronize with the GUI thread even if no events are being processed due to an idle state.

Warning: Only set WakeMainThread from the application's main thread. This variable should never be set by a secondary thread while another thread's Synchronize method is executing.

See Also

Personal tools
RAD Studio 10.2 Tokyo
In Other Languages
Previous Versions
Assistance