Good demo for showing benefits of parallelism

kris foo at bar.com
Sun Jan 28 21:10:24 PST 2007


Joel C. Salomon wrote:
> Sean Kelly wrote:
> 
>> Kevin Bealer wrote:
>>
>>> Then the question comes: why (and if) message passing / futures are 
>>> better than Thread and Mutex.  Herb Sutter argues that it is hard to 
>>> design correct code using locks and primitives like 
>>> sleep/pause/mutex, and that it gets a lot harder with larger systems.
>>
>>
>> I don't think anyone is disagreeing with you here.  CSP is built 
>> around message passing and was invented in the late 70s.  And IIRC the 
>> agent model was designed in the early 60s.
> 
> 
> The Plan 9 threads library 
> (<http://plan9.bell-labs.com/magic/man2html/2/thread>, ported to UNIX 
> and available from <http://swtch.com/plan9port/>), the (defunct) 
> language Alef, and the Limbo language on the Inferno system are all 
> based on the CSP model.  Beginning C programmers can write deadlock-free 
> programs that usefully exploit concurrency.
> 
> For God’s sake don’t copy the Java model…
> 
> --Joel

Amen.

And now that Mik has released his concise and syntactically slick CSP 
for D, well, perhaps even Tony Hoare might crack a smile :)



More information about the Digitalmars-d mailing list