Even the experts get threading wrong

Walter Bright newshound1 at digitalmars.com
Thu Aug 7 00:34:23 PDT 2008


dennis luehring wrote:
> Walter Bright schrieb:
>> http://www.ddj.com/cpp/209903274
> 
> the problem is that even with such articles and detailed descriptions of 
> the "problem" poeple tends to think that these types of errors do not 
> touch their multithreaded development - because "the others have 
> problems not i" and only a few people have seen multithreading errors
> they are the very same as the aliens in the x-files tv-serie

Yes. There are two serious problems with multithreaded programming:

1. The programmers who are confident they understand the problem, but do 
not. Their code may actually work for a long time before a problem shows up.

2. There's just no reliable way to look at a piece of code and determine 
if it has multithreading problems. Exhaustive testing is ineffective.

The D threading model aims to help by making certain kinds of subtle 
bugs impossible to express, and by narrowing the scope of where other 
types of errors may reside.

For example, the common double checked locking bug is impossible to 
express in D without subverting the type system.



More information about the Digitalmars-d mailing list