This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes BadThreads.java InterruptedException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "BadThreads.java InterruptedException" Watch "BadThreads.java InterruptedException" New topic
Author

BadThreads.java InterruptedException

Tom Turner
Greenhorn

Joined: Jun 14, 2013
Posts: 2
Hi,

I am a bit confused how InterruptedException always seems to be thrown when CorrectorThread is run in the code below. It always prints "Mares do eat oats1." What is causing this Interrupt? Is it the JVM deciding to do it or something? I am new to Threads :-)

Cheers,



Tom Turner
Greenhorn

Joined: Jun 14, 2013
Posts: 2
Uhm ok please ignore this lol. I need new glasses. I thought the statement message = "Mares do eat oats1."; was inside the catch block. Doh!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: BadThreads.java InterruptedException
 
It's not a secret anymore!