code: public void run()
      {
          try
          {
              synchronized ( lock )
              {
                  try
                  {
                      while ( !finished )
                      {
                          checkSystemInput();
                          try
                          {
                              lock.wait( 500 );
                          }
                          catch ( InterruptedException e )
                          {
                              // ignore
                          }
                      }
                  }
                  finally
                  {
                      synchronized ( lock )
                      {
                          finished = true;
                          lock.notifyAll();
                      }
                  }
              }
          }
          catch ( IOException e )
          {
              // ignore
          }
      }
docs: {@inheritDoc}