I have a multithreaded application (using ThreadPool threads) that is perfoming a number of similar tasks on different threads. At the moment each task is done independently from every other task. I need to somehow pass these tasks from each calling
thread to another woker thread that will bulk these tasks together into batches (either defined by the amount of time that has passed since the last request was received or by the total number of requests received). I then need to process these batches (in
the worker thread) and send the correct result back to the correct calling thread. I think I might need to use something like the producer/consumer pattern and somehow marshal the responses back to the calling thread. Does anyone have any pointers/examples
of how I might do this?
Thanks very much.
View Complete Post