def run(self):
        logger.debug('Spotify event loop started')
        timeout = self._session.process_events() / 1000.0
        while self._runnable:
            try:
                logger.debug('Waiting %.3fs for new events', timeout)
                self._queue.get(timeout=timeout)
            except queue.Empty:
                logger.debug('Timeout reached; processing events')
            else:
                logger.debug('Notification received; processing events')
            finally:
                timeout = self._session.process_events() / 1000.0
        logger.debug('Spotify event loop stopped')
dataset/ETHPy150Open mopidy/pyspotify/spotify/eventloop.py/EventLoop.run/original