@classmethod
def flush_queued_initial_tasks(cls):
    """
        Stops queueing tasks and processes any tasks in the queue.
        """
    cls.set_task_queueing(False)
    for task, args, kwargs in cls._preinit_task_queue:
        cls._execute_task(task, *args, **kwargs)
    cls._preinit_task_queue.clear()
    if cls._overflow_count > 0:
        from ._builtins import metrics
        metrics.glean.error.preinit_tasks_overflow.add(cls.MAX_QUEUE_SIZE +
            cls._overflow_count)
        cls._overflow_count = 0
