What is Thread Interrupt?

When a thread is put to sleep, the thread goes into the WaitSleepJoin state. If the thread is in this state it may be placed back in the scheduling queue by the use of the Interrupt method. Calling Interrupt when a thread is in the WaitSleepJoin state will cause a ThreadInterruptedException to be thrown, so any code that is written needs to catch this.

No comments:

Post a Comment