WakeMainThread variable
Handler which is called if a thread wants to synchronize with the main application thread.
Declaration
WakeMainThread: TNotifyEvent = NilDescription
WakeMainThread is a handler, which, when set, is called by the
Synchronize
routine to signal the main thread that a synchronization routine is waiting
in the queue.
This handler is by default empty. An actual implementation depends on the
main program logic (usually an event loop) and must be provided by the event loop
logic: the event loop will normally call CheckSynchronize at
regular intervals. The WakeMainThread can make sure this happens
as soon as possible.
While this handle should alert the main program thread that a thread is waiting for synchronization, the call is executed by the thread, and should therefore NOT synchronize the thread, but should somehow signal the main thread that a thread is waiting for synchronization. For example, by sending a message.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
