Well, I guess I never stopped to consider a point where the main thread (the GUI with the window Queue) would ever reach a point where it HAD 10K entires. I've never managed to get it to have more than 15 at once, and that was becuase an operation was blocking...

The method I've worked out here doesn't leave the messages on the windows queue, but moves them to its own. This doesn't seem likely to occur (hitting the limit) but it is a possibility, logicly speaking.


Yeah, the likelihood of the message queue becoming full is rare - especially on XP, but saying that Rob and I have exchanged an example which ran fine on XP, but did miss messages on 98 - the example in question was rather convoluted as it sent lots of messages.

I've also have an application where the 10k limit can be reached relatively often (several times a day, if the app was running 24/7). This app also sends/receives lots of messages, but the cause of the queue becoming full is due to "slowness" in the machine, typically when an another application starts, or due to a temporary blocking operation (such as opening a dialogue window). In that applications case, an addition thread is spawned (in C) that sits on one end of the message queue and blocks on SendMessage - this ensures that the windows queue only has one message from the internal "queue" thus ensuring that the windows queue never becomes full.

Cheers,

jez.



Reply via email to