title: Will a thread automatically close after the run() method finishes executing?
body: <p>I'm currently developing the networking for my game, and have a client and a server running. The server currently loops infinitely in another <code>Thread</code>, but my client and game code are in the same thread. I have ran into problems when the client is handling data from the server, and the game hangs until the client is done processing new packets. </p>
  
  <p>I tried to solve this, by making the client class implement <code>Runnable</code>, and run in a separate thread. I have run into some other errors, and am wondering if this is the problem. </p>
  
  <p>I have the <strong><code>run</code></strong> method, and the <strong><code>sendPacket</code></strong> method:</p>
  
  <pre><code>public void run() {
      // empty
  }
  
  public void sendPacket() {
      somePacketSendingCode();
  }
  </code></pre>
  
  <p>There is no code in the <code>run</code> method, as I only use the <code>sendPacket</code> method. <code>sendPacket</code> is called by a listener thread when a packet is received.  </p>
  
  <p>If I have no code in the <code>run</code> method, does that mean that the client <code>Thread</code> stops executing after starting? If this is so, doesn't that mean that the <code>sendPacket</code> method would do nothing?</p>