Spawning worker threads?

If you know the final order before you spawn the threads (which your "sequentially" implies), you could pass an index into each thread, and have it write its results into that "slot" in an array. Thus whan all threads have completed processing (in any order), the results will already be ordered correctly, avoiding the need for a post-processing sort entirely.

The Task Parallel Library which is now part of the Reactive Extensions for . NET Framework makes stuff like this trivial. There's a set of Parallel constructs for parallelizing your code, and a set of thread-safe Concurrent{Container}s which you can use with them.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions