Login  Register

Re: Arrays and thread safety

Posted by Albert Cardona on May 07, 2009; 10:23pm
URL: http://imagej.273.s1.nabble.com/Arrays-and-thread-safety-tp3692620p3692626.html

Michael Doube wrote:
> So is it enough for each thread to have access to separate arrays
> within a 2D array (e.g. different values of z for workArray[z][])?  Or
> does each thread need its own copy of the elements as a completely
> separate entity?



Test it. Separate entity entirely works best for me.
A subrange of an array doesn't prevent resource access contention.

Albert

--
Albert Cardona
http://albert.rierol.net