RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Classes.WakeMainThread Variable

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

Pascal
WakeMainThread: TNotifyEvent = nil;
C++
TNotifyEvent WakeMainThread = nil;

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.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!