Spawning worker threads
- by LB
In C#,
How would one go about spawning multiple threads and then sequentially adding results to a list before returning the entire result set?
What are some best practices?
I'm so far using an ManualResetEvent to signal when the last element has been processed by a thread.
But when it returns, I need to have them consolidate the result sets in sequential order so that we don't get into contention issues with the return value list (total results).