[concurrency-interest] jsr166y.forkjoin API comments

Joe Bowbeer joe.bowbeer at gmail.com
Mon Jan 28 17:20:10 EST 2008

On Jan 28, 2008 12:15 PM, David J. Biesack wrote:
> As can be seen with the Matrix Multiplication example, sometimes you want fork/join
> but you don't have an array to operate on; you just have a set of indices. In the example,
> I create a ParallelArray but don't use it; the data already exists in double[][] arrays.
> Hence the internal allocation of the Object[] array is wasted.
> [ ... ]
> I don't know if there is a solution other than adding a new create() method which defers
> allocating the internal array until and only if it is needed (or maybe not at all, and it's a
> programming error to use the wrong factory if you really wish to replace/generate values.

There is a createEmpty method.  Does it suffice?


More information about the Concurrency-interest mailing list