def loop(self):
        """Continually check the queue for new items and process them."""

        last_runs = {}

        while True:
            try:
                try:
                    item = self.q.get(block=True, timeout=self.MIN_DELAY)
                except Empty:
                    for view_id, (timestamp, delay) in last_runs.copy().items():
                        # Lint the view if we have gone past the time
                        # at which the lint wants to run.
                        if timestamp + delay > time.monotonic():
                            self.last_runs[view_id] = time.monotonic()
                            del last_runs[view_id]
                            self.lint(view_id, timestamp)

                    continue

                if isinstance(item, tuple):
                    view_id, timestamp, delay = item

                    if view_id in self.last_runs and timestamp < self.last_runs[view_id]:
                        continue

                    last_runs[view_id] = timestamp, delay

                elif isinstance(item, (int, float)):
                    time.sleep(item)

                elif isinstance(item, str):
                    if item == 'reload':
                        persist.printf('daemon detected a reload')
                        self.last_runs.clear()
                        last_runs.clear()
                else:
                    persist.printf('unknown message sent to daemon:', item)
            except:
                persist.printf('error in SublimeLinter daemon:')
                persist.printf('-' * 20)
                persist.printf(traceback.format_exc())
                persist.printf('-' * 20)
dataset/ETHPy150Open SublimeLinter/SublimeLinter3/lint/queue.py/Daemon.loop/swapped operands of `>`