© 2018 Piotr Przybył. Licensed under Simplified BSD license.
because it doesn't stop the thread instantly, you need some ceremony, so always `interrupt` your Thread again.
An interrupt is an indication to a thread that it should stop what it is doing and do something else. It's up to the programmer to decide exactly how a thread responds to an interrupt, but it is very common for the thread to terminate. This is the usage emphasized in this lesson.
[...] general principle in type system design: It is safe to assume that a type T is a subtype of a type U if you can substitute a value of type T wherever a value of type U is required. This is called the Liskov Substitution Principle.
The principle holds if T supports the same operations as U, and all of T's operations require less and provide more than the corresponding operations in U.
Programming in Scala by M. Odersky, L. Spoon, B. Venners