shared adventures in the realm of thread-safety.

Graham St Jack Graham.StJack at internode.on.net
Wed Sep 16 14:12:52 PDT 2009


On Wed, 16 Sep 2009 08:00:40 -0400, Jason House wrote:

> Graham St Jack Wrote:
> 
>> So, what is the design of shared supposed to be then? Its time for
>> Walter to buy in and tell us where this is all going - I for one am
>> very confused right now.
> 
Thanks for that. Its good to know that there is a plan in there 
somewhere, even if the details are still very fuzzy. I agree that the 
lofty goal of improving thread-safety for mere mortals is worthwhile, and 
that it won't be easy to pull off.

What I was really after though is what the plan is for D2 right now. The 
whole shared situation in D2 looks like a mess to me, and I would like 
some reassurance that something simple and tidy will be happening soon.



> Here's what I know:
> • Bartosz's ownership scheme is delayed until at least D3 • Shared 
code
> will be sequentially consistent • Walter likes the idea of optimizing
> away memory barriers that the compiler can prove are unneeded (some
> barriers in synchronized sections) • Bartosz is rewriting how threads
> are done similar to what his blogs hint at • Issues that Bartosz hits
> with shared are fixed immediately
> 
> Here's what I suspect from a number of emails: • Because every class
> contains a monitor, Walter/dmd will treat every class as its own monitor
> for the purposes of optimization.
> 
> I too wish Walter would advertise the design, but I think the simple
> fact is that he doesn't know what the design is!




More information about the Digitalmars-d mailing list