About Question enthuware.ocpjp.v17.2.3753 :
Moderator: admin
-
- Posts: 5
- Joined: Thu Dec 29, 2022 1:33 am
- Contact:
About Question enthuware.ocpjp.v17.2.3753 :
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?
or in simple words which are all the states in which if a thread is, , can cause interrupted exception on calling interrupt?
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v17.2.3753 :
TIMED_WAITING or WAITING or BLOCKED
-
- Posts: 5
- Joined: Thu Dec 29, 2022 1:33 am
- Contact:
-
- Posts: 1
- Joined: Mon Nov 27, 2023 5:20 am
- Contact:
Re: About Question enthuware.ocpjp.v17.2.3753 :
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.
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.
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v17.2.3753 :
Not sure I understand your question. Can you please rephrase?
-
- Posts: 167
- Joined: Sun Apr 21, 2024 10:43 am
- Contact:
Re: About Question enthuware.ocpjp.v17.2.3753 :
very good explanation but you dont explain why T1 RUNNABLE can be printed only 1 time, you explain 3 options with T1 RUNNABLE printed two times
-
- Site Admin
- Posts: 10384
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v17.2.3753 :
Not sure what I understand your doubt. If you are clear that T1 RUNNABLE can be printed two times, doesn't that mean T1 RUNNABLE cannot be printed only 1 time?
Who is online
Users browsing this forum: Bing [Bot] and 10 guests