Interrupting a Java Thread | interrupt() | interrupted()

preview_player
Показать описание
If any thread is in sleeping or waiting state (i.e. sleep() or wait() is invoked), calling the interrupt() method on the thread, breaks out the sleeping or waiting state throwing InterruptedException. If the thread is not in the sleeping or waiting state, calling the interrupt() method performs normal behaviour and doesn't interrupt the thread but sets the interrupt flag to true.

The video pdf is provided in the below link:

0:00 Intro
1:04 Example Interrupting Thread that stops working
4:28 Interrupting Thread that works
7:06 Interrupting thread behaves normally
10:54 IsInterrupted and interrupted method
Рекомендации по теме
Комментарии
Автор

A good video, thank you, it's ok to have a bit lengthy video for a complex concept.😃

smeeangle
visit shbcf.ru