July 24, 2008
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/
July 25, 2008
"Walter Bright" <newshound1@digitalmars.com> wrote in message news:g6b1ae$up4$1@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/

Very cool stuff.  So is a future version of D going to use thin locks when the synchronize keyword is used?

-Craig 

July 25, 2008
On Thu, 24 Jul 2008 15:56:14 -0700, Walter Bright wrote:

> 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/

Very nice. I particularly like the part about not needing thread-safe and non-thread-safe versions of library code.
July 25, 2008
Walter Bright Wrote:

> 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/

very cool stuff that's gonna cross the t in threads for d. i'm so very glad bartosz is on team. would he join the newsgroup, or is he a mimosa as well?
July 25, 2008
"Walter Bright" <newshound1@digitalmars.com> wrote in message news:g6b1ae$up4$1@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. It sure appears that it does from WinNT.h :

typedef struct _RTL_CRITICAL_SECTION {
   PRTL_CRITICAL_SECTION_DEBUG DebugInfo;

   //
   //  The following three fields control entering and exiting the critical
   //  section for the resource
   //

   LONG LockCount;
   LONG RecursionCount;
   HANDLE OwningThread;        // from the thread's ClientId->UniqueThread
   HANDLE LockSemaphore;
   ULONG_PTR SpinCount;        // force size on 64-bit systems when packed
} RTL_CRITICAL_SECTION, *PRTL_CRITICAL_SECTION;

(from WinBase.h: typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;)

L. 

July 25, 2008
"Craig Black" <craigblack2@cox.net> wrote in message news:g6ba04$1pfb$1@digitalmars.com...
> "Walter Bright" <newshound1@digitalmars.com> wrote in message news:g6b1ae$up4$1@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/
>
> Very cool stuff.  So is a future version of D going to use thin locks when the synchronize keyword is used?
>
> -Craig

It's something that's part of the runtime lib.  I think they can be implemented in Tango already.  I'm not sure how robust Phobos is in terms of monitor flexibility.


July 25, 2008
Jarrett Billingsley Wrote:

> "Craig Black" <craigblack2@cox.net> wrote in message news:g6ba04$1pfb$1@digitalmars.com...
> > "Walter Bright" <newshound1@digitalmars.com> wrote in message news:g6b1ae$up4$1@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/
> >
> > Very cool stuff.  So is a future version of D going to use thin locks when the synchronize keyword is used?
> >
> > -Craig
> 
> It's something that's part of the runtime lib.  I think they can be implemented in Tango already.  I'm not sure how robust Phobos is in terms of monitor flexibility.

but i thot (hoped) that bartosh works on phobos already?
July 25, 2008
Walter Bright wrote:
> 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/

Thanks a very interesting read!

-Joel
July 25, 2008
Jarrett Billingsley wrote:
> It's something that's part of the runtime lib.  I think they can be implemented in Tango already.  I'm not sure how robust Phobos is in terms of monitor flexibility. 

The way the locks work is independent of the compiler, it's a pure runtime library thing.
July 25, 2008
superdan wrote:
> Walter Bright Wrote:
> 
>> 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/
> 
> very cool stuff that's gonna cross the t in threads for d. i'm so
> very glad bartosz is on team. would he join the newsgroup, or is he a
> mimosa as well?

We are very lucky to have Bartosz working with us. He's an expert on multithreaded programming, and even better, he spends a lot of time researching the latest in what others are doing so that D will build on best practices rather than reinvent mistakes.
« First   ‹ Prev
1 2 3
Top | Discussion index | About this forum | D home