def run(self):
        while True:
            # This is a big lock, but ensures a player is not deleted while
            # we're processing it -- this saves on extra checks in the
            # player's methods that would otherwise have to check that it's
            # still alive.
            self.condition.acquire()

            if self.stopped:
                self.condition.release()
                break
            sleep_time = -1

            # Refill player with least write_size
            if self.players:
                player = None
                write_size = 0
                for p in self.players:
                    s = p.get_write_size()
                    if write_size > s:
                        player = p
                        write_size = s

                if write_size > self._min_write_size:
                    player.refill(write_size)
                else:
                    sleep_time = self._nap_time
            else:
                sleep_time = self._sleep_time

            self.condition.release()

            if sleep_time != -1:
                self.sleep(sleep_time)
dataset/ETHPy150Open ardekantur/pyglet/experimental/mt_media/drivers/openal/__init__.py/OpenALWorker.run/swapped operands of `>`