D2 Multithreading Architecture - Part 2 - Time to vote if you

Jason House jason.james.house at gmail.com
Mon Jun 8 05:43:04 PDT 2009


Nick B Wrote:

> Jason House wrote:
> > Bartosz's latest blog implies he's settled on a design. I'm curious if that means dmd 2.031 will finally contain the critical changes for that.
> > 
> > If I understand the blog cirrectly, the design (in a nutshell) is as follows:
> > 1. Data passing between threads reqires shared, unique, or invariant
> > 2. Shared variables will include the proper monitor to lock in order to use them
> > 3. Shared variabled ensure sequential consistency
> > 4. Lockless programming will be supported
> > 
> > Did I miss anything or get anything wrong? I know there are specific details yet to be shared, and I tried to not elaborate on specific points.
> 
> Back on April 29th, Jason posted this summary, above, of Bartosz's 
> proposal.  Bartosz, since then, has posted more details.
> 
> This one on May 26th :
> 
> http://bartoszmilewski.wordpress.com/2009/05/26/race-free-multithreading/
> 
> and this one on June 2nd
> 
> http://bartoszmilewski.wordpress.com/2009/06/02/race-free-multithreading-ownership/
> 
> 
> Now there seems to be some difference of opinion as to if Bartosz's 
> proposal should be included in D2.
> 
> So if you have been reading these posts with interest, AND you think 
> this should be included with D2 then place your vote.


That sounds like a biased survey...

 
> Hopefully Walter, balancing all the demands on his time, will notice 
> what the community has said it would like, and commit to include 
> bartosz's proposal into D2 before it is finalized.

Will a community poll be enough to convince Walter to ignore Andrei's reservations? I doubt it. As best as I can tell, Andrei has the following concerns:
1. unique types and lent will require extensive changes to code similar to the const system
2. ownership tracking will require excessive templating
3. Shared memory won't be used much and all we need is message passing

The last one is used as justification to reconsider multi-threaded design.

To truly get something rolling, one or more of the following need to be proven:
1. Upcoming hardware and software systems will use shared memory over message passing.
2. Message passing requires more than just unique value types or arrays to value types. (under such restrictions, library-based solutions become trivial)

I have to hold my vote until a D-based design incorporating Bartosz's ideas is made. I like unique, move semantics, and lent. I worry that ownership specification will feel unnatural and that reasonable defaults for ownership and lent won't be found.


   

 
> Here is my vote. +1.
> 
> 
> please vote.
> 
> cheers
> Nick B




More information about the Digitalmars-d mailing list