Categories

Updated: 08/31/2001

Diagnosing Java Code : The Orphaned Thread bug pattern

In multithreaded code, it is often common to use a single, master thread that drives the actions the other threads take. This master thread may send messages, often by placing them on a queue, that are then processed by the other threads. But if the master thread throws an exception, the remaining threads may continue to run, awaiting more input to the queue, causing the program to freeze. This article discusses detecting, fixing, and avoiding this bug pattern.
©2019 A--9.com