Reputation: 195
I am holding a list of Threads, each associated with a Runnable. After running them for a while, some of them changed into the state TERMINATED, though they shouldn't because of while(true) implemented in run(). So I guess those are crashed, am I right?
edit: each thread is independent from the others.
Upvotes: 0
Views: 100
Reputation: 272257
They may have thrown an exception themselves, or been interrupted by another thread. I assume that there's no flow control you've implemented to jump out of the while loop (via an exception) and then cleanly complete processing.
Upvotes: 1