On Thursday, 9 October 2014 at 10:10:20 UTC, Konstantin wrote:
Are you looking for parallel? http://dlang.org/library/std/parallelism/parallel.html

I have seen this, but I'm not sure how to use it.

Maybe:

float[][] maps = new float[#threads][resolution * resolution];

foreach(i, ref elem; parallel(maps)){
    elem = generateTerrain(...);
}

Does this look right?

Yeah, it is.

Reply via email to