code: def _flush(self):
          
          if self._recording:
              raise Exception("Cannot flush data queue while recording!")
          if self._saving_cache:
              logging.warn("Flush when using cache means unsaved data will be lost and not returned!")
              self._cmds_q.put(("reset_data_segment",))
          else:
              data = self._extract_q(0)
              return data
docs: Returns a list of all current data