Re: Hokay, I officially give up...

Brian Hurt <[email protected]> Fri, 22 May 2009 12:08:51 -0400 (EDT)
Newsgroups gmane.comp.programming.language-of-the-year
Message-ID <alpine.DEB.2.00.0905221158540.600@beast>

On Fri, 22 May 2009, John Carter wrote:

> Threading is a truly awful paradigm and I truly regret ever having
> anything to do with it.

Threading is definitely the challenge of this generation.

The real problem with multithreading bugs is that they are, basically by 
definition, Heisenbugs.  Literally, adding a debug print statement in some 
unrelated part of the code changes the timing, and thus the behavior, of 
the bug.  Let alone things like changing the environment.  If the problem 
takes four days to replicate, this is unacceptable in a lot of 
environments- but it's also a royal pain to track down and fix (been 
there, done that).  And things like unit tests don't help (the unit test 
has been running a thousand times a second for the last three days, and 
hasn't failed yet- can we declare it working yet?  Um, no.).

Unfortunately, I think that multithreading is inevitable.  The number of 
cores is going to continue doubling every ~2 years, for the forseeable 
future.  Not only do we need to handle 2-, 4-, and 8- core machines, in 
the not too distant future we'll need to handle 1024-core machines, or 
16,384-core machines.

I think there is hope- but it comes at a cost.  The cost is radically 
rethinking how we do programming.

Brian