how does 'shared' affect member variables?

bitwise via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 9 19:14:51 PDT 2015


On Sat, 09 May 2015 21:32:42 -0400, Mike <none at none.com> wrote:

> it looks like what you are trying to implement is what `synchronized`  
> already provides:   
> http://ddili.org/ders/d.en/concurrency_shared.html#ix_concurrency_shared.synchronized
>
> Mike

Yes, but synchronized uses a mutex. Spin locks can perform better in  
situations where there won't be much contention for the lock.

   Bit


More information about the Digitalmars-d-learn mailing list