multithreading communication
Is sending\posting messages the preferred way to communicating between threads ? I've read about using events and global variables but not convinced thats a good option.
What if it's a worker thread that has no message pump ?
Im very keen to learn more about multithreading so any article\ tutorial anyone can recommend is more than welcome.
[369 byte] By [
laasunde] at [2007-11-18 17:35:55]

# 2 Re: multithreading communication
Well...like usual it kind of depends on what you are trying to do... :cool:
Take a look at the following ( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/multiple_threads.asp)...
# 3 Re: multithreading communication
Didnt know there was a multithreading forum.
Thanks for the link but I'm at the moment developing in mfc.
My question was suppose to be a general question about multithreading.
Is messages the preferred way to execute a method in another thread ? How can I find out that state of a thread ?
Another thing, need advice on a design matter. Im developing a program that needs to receive small datapackages about 8-12 every second and then process the received data. I've made a class that derives of CAsyncSocket to receive the data. Would it make much of difference speed wise to have the receive object run in the primary thread or create a separate thread for the receiving object.