[Lazarus] Sending messages
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Fri Nov 25 10:35:42 CET 2011
Felipe Monteiro de Carvalho schrieb:
> On Thu, Nov 24, 2011 at 6:18 PM, Hans-Peter Diettrich
> <DrDiettrich1 at aol.com> wrote:
>> Q: does the LCL support more than one message queue (the one in
>> Application)?
>
> There are various event loops:
>
> * Application.Run
> * ShowModal makes a loop too
> * ProcessMessages has a short lived loop
>
> And user code can also start their own loops by using ProcessMessages
This doesn't answer my question. What's the *source* of the processed
messages?
> I wouldn't call those loops "event queues", because they don't
> implement any kind of queues, they process all events which are
> obtained immediately. The events are not stored in queues. The queue
> itself is inside the backend library, for example Windows API, X11,
> etc.
So what happens on PostMessage, in detail when multiple threads post
messages at the same time?
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?)
What happens in TWidgetset.PeekMessage?
DoDi
More information about the Lazarus
mailing list