• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Dan's Thread question  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello the question I'd like to ask is Dan's thread question, exam 2 q8. Dan gave an explanation that says:
"Thread.join will throw an InterruptedException if the interrupt method is invoked on the referenced Thread."
However I think the interrupt method is invoked on the 'current' thread (the thread that is waiting for the referenced thread to die), not on the referenced thread. Because when join() is invoked, the current thread is in the not-runnable state. The other thread can call interrupt() to force the current thread out of the not-runnable state. I don't know if my theory is correct or not. Can someone clarify?
thanks,
Richard
[ January 25, 2004: Message edited by: Richard Chou ]
 
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Richard,
Yes, the word "referenced" needs to be changed to the word "current".
Thank you for that correction!
 
What does a metric clock look like? I bet it is nothing like this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!