Sharing in D

bearophile bearophileHUGS at lycos.com
Mon Aug 11 12:20:40 PDT 2008


dsimcha:
>  What about arrays, etc that are manipulated by multiple threads, but in such a
> way that each thread is guaranteed not to touch the same elements as any other
> thread, and to never reallocate the array?

If you take a slice of an array [a..b] you don't copy data, so if threads can work on adjacent parts you can slice it in parts that are unshared, and then use the whole usliced block of data...

Bye,
bearophile



More information about the Digitalmars-d mailing list