How can I exit a background thread when the form closes?
<p>I'm calling <code>tcpListener.AcceptTcpClient()</code> inside its own thread.  Because this blocks forever, the thread doesn't exit when my form closes.  I tried calling <code>listenThread.Abort()</code>, but the thread doesn't exit.  It's stuck on <code>AcceptTcpClient()</code>.</p>

<p>How can I get my whole program to shutdown when I close the main form?</p>
