This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
[ January 07, 2007: Message edited by: Nicholas Jordan ] [Since posting this, I have read that one cannot do an interrupt on System.in - it will not work]
Originally posted by Darryl Failla: There doesn't appear to be any elegant way of interrupting a thread that is stuck in a loop using Java 1.4. Is that true?
Stuck in a loop should make no difference.
It also appears that the thread interrupt method of 1.5 may be more powerful and allow this action.
I would not think the interrupt() of 1.5 to be greatly different from 1.4 - at least conceptually from a coders point of view. There may be efficiency concerns at runtime that are producively addressed by this question, but only if you are applying Java to a time-critical performance arena.
What would be the compile options to show the the thread interrupt method of 1.5 may be more powerful ? [ April 22, 2007: Message edited by: Nicholas Jordan ]
"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."