O'Reilly logo

Quality Code: Software Testing Principles, Practices, and Patterns by Stephen Vance

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A Brief Introduction to Threads and Race Conditions

Before we dive into how to test parallel code, let’s take a brief tour through the history of parallel programming1 and the anatomy of a race condition.

1. Consider this section a condensed and idealized history. Like most advances in knowledge and practice, the reality is not as linear or logical as presented here. For more detail on threads, Java concurrency libraries, principles of atomicity and immutability, and more, I highly recommend Java Concurrency in Practice [JCIP].

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required