title: Is it possible to stop a thread using a custom exception?
body: <p>I searched at the Internet about stopping a thread. I could only find a deprecated method and a <code>while</code> method which doesn't really work.</p>
  
  <p>My idea is declaring a custom exception and putting a <code>try</code> in the thread so I can stop that thread by throwing the exception.</p>
  
  <p>Is my idea non-sense and is that why I can't find an answer like this on the Internet?</p>