Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: Nailed it!
| Subject: | Re: Nailed it! |
| Posted by: | "Martin James" (mjames_falc..@dial.pipex.com) |
| Date: | Tue, 27 Jun 2006 14:18:08 |
"Ciaran Costelloe" <ccostelloe@flogas.ie> wrote in message
news:44a11717$1@newsgroups.borland.com...
> Martin James wrote:
>
> > There is a persistent rumour that Windows occasionally loses
> > messages. I think that this fallacy arises from the behaviour of
> > timers, which the Windows docs imply work by queueing messages. If
> > the main thread is tied up for a time longer than a timer interval,
> > it appears that a *timer message gets lost', hence the erroneous
> > extrapolation that all windows messages are at risk of occasional
> > 'loss'.
>
> Windows does not lose messages in this case, because it never generates
> timer or mouse-movement messages for the message queue in the first
> place: when you call the Windows message pump, it won't look for timer
> or mouse-movement events if it has any message in its queue.
Yes - this is what I was trying to say. The timer driver will run on the
hardware interrupt and set the event in the WMQ, but if the event is alredy
set, nothing changes. The event will be reset when the main thread gets
around to calling it smessage queue *and* there are not higher-priority
'message classes' waiting.
Rgds,
Martin
none