code: public void startListening() {
          if (listenForCommands) {
              listeningThread = new Thread("kernel-command-listener") {
                  @Override
                  public void run() {
                      while (listenForCommands && acceptAndExecuteCommand()) {
                          //loop intentionally empty
                      }
                  }
              };
              listeningThread.start();
          }
      }
docs: Start listening for incoming commands.
  read() (accept()/read()) are blocking, not waiting, operations.
  Locks are not suspended while waiting for input