Concurrency

Concurrent software can be a rich source of difficult-to-reproduce, difficult-to-diagnose, and difficult-to-fix problems. Bugs in such software often exhibit nondeterminism, depend upon subtle and difficult to understand interactions, and suffer from mysterious failure modes.

Simplicity and Control

You can build a number of things into your concurrent software that will help during debugging. The two keys are simplicity and control.

Simplicity is a key element of any software design, but it’s particularly valuable when dealing with concurrency. Keep the interactions between independent threads straightforward, and constrain them to as small a number of areas of code as possible. You might be surprised how simple you can make the ...

Get Debug It! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.