title: Thread stops itself
body: <p>I've been searching for a solution for a long time, but I wasn't able to find one, so I'll ask my question here.
  I have a thread which is started when the program starts and supposed to be idle until it is enabled by the application. Simple code example:</p>
  
  <pre><code>private class UpdaterThread extends Thread {
  
      private static final int UPDATE_RATE = 50;
      private Timer updateTimer = new Timer();
  
      private boolean enabled;
  
      public void run() {
  
          while (!closeRequested) {
  
              // If this is uncommented, the thread works as it's supposed to.
              // System.out.print("");
  
              if (enabled) {
  
                  Snapshot next = getNextSnapshot(1f / UPDATE_RATE);
                  System.out.println("Got next Snapshot");
                  updateTimer.sync(UPDATE_RATE);
                  System.out.println("Push");
                  currentSnapshot = next;
              }
          }
      }
  
      public void enable() {
  
          enabled = true;
      }
  
      public void disable() {
  
          enabled = false;
      }
  }
  </code></pre>