[dmd-concurrency] shared arrays

Michel Fortin michel.fortin at michelf.com
Wed Jan 27 16:19:46 PST 2010


Le 2010-01-27 à 18:25, Andrei Alexandrescu a écrit :

> Consider a shared array:
> 
> shared int[] x;
> 
> What can be done with it? It's tricky; the array has two words worth of info and we can't assume 128 bits can be atomically written on a 64-bit machine.

Isn't that a great case for a lock pool controlled with a hash table? If you have dismissed that option, why?


-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/





More information about the dmd-concurrency mailing list