KentBeck/junit — Issue #388: Potential multi-threading issue in tests with timeouts
Author: PhillHenry
Created: 2012-02-21 19:04:32+00:00
State: open

FailOnTimeout.StatementThread.fFinished should be volatile since at least 2 threads access it: the main thread and StatementThread (which is started by main).

This is "to ensure that updates to a variable are propagated predictably to other threads" (Java Concurrency in Practice, 3.1.4, Joshua Bloch).