On 11/25/2011 10:35 AM, Hans-Peter Diettrich wrote:
So what happens on PostMessage, in detail when multiple threads post messages at the same time?
With PostMessage, the events are queued one after the other and (some days later) handled in the main thread in this sequence,

TWidgetSet.SendMessage and PostMessage are both documented as thread-safe. Is this correct, and if so, how is that ensured? Does a SendMessage call bypass any other messages which have been queued until that time? (by dispatching the message immediately to the target?)

AFAIK, SendMessage (like Dispatch) (at least when addressing a GUI object) can only be used in the Main thread, as it (might) result din just calling the appropriate (not thread safe) LCL function.

-Michael

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to