Is there a maximum size for the message queue, per application (MFC app) or
per thread (CWinThread) ?
TIA, I also appreciate if some one can point a document about this ?
Under 16 bit Windows, the queues were a fixed size (alterable via
SetMessageQueue), but under Win32 OS's they're dynamic - there's no
fixed limit.
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
To test this, create two threads, and lock one thread
until the other finishes. Send about 5-6K PostMessages
with some indicator, unlock the thread and less than 5K
will be seen.
We found this in our application that communicates over
the network. When the user requrests an action, the
calling thread sends the message and then is locked
waiting for the other thread to signal that it has
received all the information. The other thread reads over
20K records and for each record received would send
PostMessage to the calling thread. When we noticed that
less than 5K of the requested 20K was seen, we started
looking and noticed this.
We solved it by creating a link list with all the records
and passing one PostMessage.
Larry
>.
>
Joseph M. Newcomer [MVP]
email: newc...@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Larry,
Do the missing PostMessage calls return failure?
Do you have a simple (small amount of source code) repro example to
demonstrate this issue?
On Wed, 01 Oct 2003 22:58:09 +0100, David Lowndes <dav...@mvps.org> wrote:
>>There maybe a limit under Win16, but we have an
>>application that locks the thread (processing the queue)
>>and another that sends around 20K PostMessages, but less
>>than 5K get processed.
>
>Larry,
>
>Do the missing PostMessage calls return failure?
>
>Do you have a simple (small amount of source code) repro example to
>demonstrate this issue?
>
>Dave
Joseph M. Newcomer [MVP]
Aha, you find something new everyday! I'd not seen that before.