IndexOutofRangeException while using WriteLine in nested Parallel.For loops
- by Umar Asif
I am trying to write kinect depth data to a text file using nested Parallel.For loops with the following code. However, it gives IndexOutofRangeException.
The code works perfect if using simple for loops but it hangs the UI since the depth format is set to 640x480 causing the loops to write 307200 lines in the text file at 30fps.
Therefore, I…