www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: shared adventures in the realm of thread-safety.

reply Jason House <jason.james.house gmail.com> writes:
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.

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!
Sep 16 2009
parent Graham St Jack <Graham.StJack internode.on.net> writes:
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.


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 

 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!

Sep 16 2009