code: def awaitTermination(self, timeout=None):
          
          if timeout is None:
              self._jssc.awaitTermination()
          else:
              self._jssc.awaitTerminationOrTimeout(int(timeout * 1000))
docs: Wait for the execution to stop.
  
          @param timeout: time to wait in seconds