C# separate array data to process another thread. Within same class? or not?
Posted on 2010-08-12
Stuck on how to do the following.
I'm collecting data and have it in array and can copy to another array within same class
BUT if I want to have separate thread to process on the copy of the array how do design that?
Array.Copy( x,x,x,x,x) doesn't see the array outside the class.
And if the array copy is in the class with original array, I cannot figure out how to have a separate thread to proccess while data is still streaming to original array.
I've looked at Monitor and locks etc.