Race conditions are only a problem if two threads can simultaneously read and change the same variable.
As long as you are sure that each thread uses a different range of indices and the underlying array is not redefined, then it should be safe to think of each cell as a different variable. Therefore, each thread works with a separate set of variables, and you will not get the conditions of the race.
At the same time, make sure that you really do not overlap when using indexes - this is often more complicated than it seems.
In addition, you must make sure that two cells are not displayed in the object - if you change the same object (and not just a link to it) from two threads, you can get a race condition.
Uri Jun 02 '09 at 15:17 2009-06-02 15:17
source share