Bartosz Milewski Missing post

Bartosz Milewski bartosz-nospam at relisoft.com
Sat May 30 09:33:55 PDT 2009


Jason House Wrote:


> > I see, you're a hardcore lockfree programmer. All you can expect from D is Sequential Consistency--nothing fancy like C++ weak atomics. But that's for the better.
> 
> Far from it! I'm stumbling through in an attempt to teach myself the black art. I'm probably in my 3rd coding of the project. The first incarnation had no threads. The 2nd used message passing. The current one is lockless, but still a work in progress.
>  
Are you sure it's worth the effort? It's extremely hard to get lock-free right, and it often doesn't offer as much speedup as you'd expect. Well, in D it might, because it still doesn't use thin locks.

> What about cmpchx (AKA compare and swap). It occurs in a lot of algorithms. Also, "lock inc" is fundamental to my use of lockless variables.

These will either be implemented in the library (inline assembly) or as compiler intrinsic. It's not hard.




More information about the Digitalmars-d mailing list