Page 1 of 1

About Question enthuware.ocpjp.v17.2.3753 :

Posted: Fri Jan 20, 2023 7:47 am
by shwetagulati
Calling interrupt on a thread that it is in TIMED_WAITING or WAITING or BLOCKED state causes an interrupted exception? is that true?


or in simple words which are all the states in which if a thread is, , can cause interrupted exception on calling interrupt?

Re: About Question enthuware.ocpjp.v17.2.3753 :

Posted: Fri Jan 20, 2023 9:32 am
by admin
TIMED_WAITING or WAITING or BLOCKED

Re: About Question enthuware.ocpjp.v17.2.3753 :

Posted: Fri Jan 20, 2023 9:54 am
by shwetagulati
thanks

Re: About Question enthuware.ocpjp.v17.2.3753 :

Posted: Tue Dec 05, 2023 3:23 am
by mellester
I get that a thread that is running does not get a InterruptedException.

However in this question a interrupt is fired 300 mile seconds after T1 is started there must be something really weird going on if T1 is not always in waiting at that time.
Can I just not reason with these time frames.

Re: About Question enthuware.ocpjp.v17.2.3753 :

Posted: Tue Dec 05, 2023 4:52 am
by admin
Not sure I understand your question. Can you please rephrase?