Thin Locks in D

Jesse Phillips jessekphillips at gmail.com
Sat Jul 26 10:27:31 PDT 2008


On Fri, 25 Jul 2008 15:06:22 -0300, Leandro Lucarella wrote:

> superdan, el 25 de julio a las 13:17 me escribiste:
>> Leandro Lucarella Wrote:
>> 
>> > Sean Kelly, el 24 de julio a las 23:09 me escribiste:
>> > > Lionello Lunesu wrote:
>> > > >"Walter Bright" <newshound1 at digitalmars.com> wrote in message
>> > > >news:g6b1ae$up4$1 at digitalmars.com...
>> > > >>http://bartoszmilewski.wordpress.com/2008/07/24/thin-locks-in-d/
>> > > >>
>> > > >>and of course on reddit:
>> > > >>
>> > > >>http://www.reddit.com/comments/6tbzc/thin_locks_in_d/
>> > > >I remember reading somewhere that critical-sections on Windows do
>> > > >just that.
>> > > 
>> > > They pretty much do.  And futexes are largely the same thing in
>> > > Linux.
>> > 
>> > So, why D must reinvent the wheel, duplicating a well known technique
>> > done in most modern OS? This will only add overhead to D.
>> > 
>> > Please, at least make it conditional only to OSs that don't provide
>> > this optimization by themselves.
>> 
>> there is no reinvention. the man quotes his sources. at most there is
>> reimplementation. and that's unavoidable as far as i understand. thin
>> locks must be integrated with the object model so they place that word
>> right there and do shit with it.
> 
> Then please don't add this at all! It's a little lame add overhead to
> all modern OS just to be a babysitter of poor ones.

I'm pretty sure that just because your OS handles multi-threading this 
way that your program won't just automatically inherit it. When you right 
your program, you have to handle all the synchronous issues yourself, 
otherwise all this multi-threading business would be a snap.



More information about the Digitalmars-d mailing list