Wrap-Up
There’s a common misconception about parallelism—many people believe that parallel programming necessarily raises the specter of nondeterminism. If things aren’t proceeding sequentially, the reasoning goes, and we can no longer rely on effects happening in a specific order, we’re always going to have to worry about race conditions.
Certainly, there are some concurrent programs that will always be nondeterministic. And this is unavoidable—some problems require solutions that are intrinsically dependent on the details of timing. But it’s not the case that all parallel programs are necessarily nondeterministic. The value of the sum of the numbers between 0 and 10,000 won’t change just because we add those numbers together in parallel ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access