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.
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.
Bookmarks