code: def stop(self, timeout: int = 5) -> None:
          
          self.running = False
          start = time.perf_counter()
          while True:
              if self.getsCounter == 0:
                  return True
              elif time.perf_counter() <= start + timeout:
                  time.sleep(.1)
              else:
                  raise StopTimeout("Stop timed out waiting for {} gets to "
                                    "complete.".format(self.getsCounter))
docs: Try to stop the transaction store in the given timeout or raise an
          exception.