Why concurrency is hard in one sentence

“Shared memory is like a canvas where threads collaborate in painting images, except that they stand on the opposite sides of the canvas and use guns rather than brushes. The only way they can avoid killing each other is if they shout “duck!” before opening fire.”

from: http://bartoszmilewski.com/2013/12/10/functional-data-structures-and-concurrency-in-c/

Advertisements