Click to See Complete Forum and Search --> : multithreading communication
laasunde
March 6th, 2004, 04:00 PM
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.
Andreas Masur
March 6th, 2004, 04:11 PM
[Moved thread]
Andreas Masur
March 6th, 2004, 04:13 PM
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)...
laasunde
March 6th, 2004, 04:43 PM
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.
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.