[Lazarus] PostMessage return value

Michael Schnell mschnell at lumino.de
Mon Sep 15 14:48:54 CEST 2014


On 09/15/2014 02:19 PM, Xiangrong Fang wrote:
>
>
> But what I need PostMessage for is to notify main thread (or another 
> thread)

You can only notify the main thread. There is no (standard) means to 
notify another thread, as they don't have an event queue.

OTOH a worker thread is allowed to wait a long time for an event (e. g 
via TCriticalSection), while doing this in the main thread would freeze 
the GUI.

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20140915/d4a7e469/attachment-0003.html>


More information about the Lazarus mailing list