Thanks Ehsan,
As the Winsock server application is a Dialog application, the PostMessages(..) post messages to the CDialog class, so I take it that its one thread recieving the messages? If so, how is the messages handled within a single thread, one message routine completes, before another one is processed?


So there are 4 IOCP worker threads, which can all pass messages to the main CDialog class, so is it possible that two message handlers execute simultaneously?

Thanks
Neil


----- Original Message ----- From: "Ehsan Akhgari" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, April 30, 2005 6:04 PM
Subject: Re: [msvc] Posting a message



Neil Devlin wrote:
Hi Ehsan,
The application creates 4 worker threads , as there are 2 processors. There is a chance that all 4 seperate threads may post a message, can this cause a problem?

Hmm, I thought there's only one thread receiving the messages...

If this is not the case, and the message handling code access any global data, you must implement proper synchronization mechanisms. In that case, it's possible that two message handlers execute simultaneously.

--
Ehsan Akhgari
Farda Technology <http://www.farda-tech.com/>

"Everything should be made as simple as possible, but not simpler." -- Albert Einstein

_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.





_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to