Quote Originally Posted by UnderDog
Any type of producer/consumer problem can be neatly solved by using thread messages. Just passing the this pointer works only in cases where the worker thread just munges on some data from the class that it is passed and then it finishes.
By passing the pointer can't you share pretty much any data between threads? That data can be a list, a queue or whatever. I don't see how you are limited to munging data.
Quote Originally Posted by UnderDog
There are many problems where there are multiple threads that continue to stay on and act on e.g. messages/data being produced by some producer thread. Mostly these cases arise when the threads have to maintain states.
What are these problems? I mean if you can access any data with the pointer (and the data is synchronized) I don't see any issues where moving to PostThreadMessage solves.