Concurrency.

Sean Kelly sean at invisibleduck.org
Wed Nov 30 17:00:04 PST 2011


On Nov 27, 2011, at 9:51 PM, Debdata wrote:
> 
> I agree that message passing and resource hiding are a great way to go for a lot of cases, but there are an equally large (Larger?) number of cases
> that would benefit from global sharing. Especially when threading for performance rather than convenience. The cutting edge of high performance
> threading is really the task stealing approach. See intel's TBB, cilk, etc. Implementing things like that would become unnecessarily verbose as most
> things will be shared and we have to keep tagging.

This is more the domain of std.parallelism and it's quite useful, but each have their strengths.  For one, message-based concurrency can scale horizontally across machines if done correctly (see Erlang, for instance), which can be a huge win.  Also, I find it to be a much easier model to develop for.  The work-stealing and similar models expose some of the details of threading and concurrency by necessity, which means that the programmer has to think about this and craft the code appropriately.  I think this model will be progressively less common as time goes on.


More information about the Digitalmars-d mailing list