2009/3/25 Michael van der Gulik <[email protected]>: > On 3/26/09, Markus Fritsche <[email protected]> wrote: >> Igor Stasenko <[email protected]> wrote: >> >>> | array sum1 sum2 | >>> sum1 := 0. sum2 := 0. >>> array := Array new: 10. >>> [ 1 to: 10000000 do: [ :i | array at: (10 random) put: (Array new: 10) ] ] >>> fork. >>> [ 1 to: 10000000 do: [ :i | array at: (10 random) put: (Array new: 10) ] ] >>> fork. >>> 1 to: 10000000 do: [ :i | array at: (10 random) put: (Array new: 10) ]. >> >> Something I came across leately: Threads are evil - >> http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf > > They're not evil, just mischievous. > > I find it a fairly unimpressive article that recites what any decent > programmer already knows about parallel programming. > > "This scenario is bleak for computer vendors: their next generation of > machines will become widely known as the ones on which many programs > crash." > > heh. True. >
hehe -- To offer a third analogy, a folk definition of insanity is to do the same thing over and over again and to expect the results to be different. By this definition, we in fact require that programmers of multithreaded systems be insane. Were they sane, they could not understand their programs. -- a spin loop is very good illustration of it: self locked whileTrue:[ self wait ] :) > Gulik. > > -- > http://gulik.pbwiki.com/ > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
