import threading


class G:
    """Global state of the Benchmark Client."""
    result_platform = None
    progress_status = None
    result_stats = None
    result_dict = None
    background_image_path = ""
    scene_status = {}
    cancel = False

    cached_system_info = None
    cached_compute_devices = None
    results_submitted = False

    images = {}
    current_progress = 0.0
    progress_lock = threading.Lock()

    @classmethod
    def reset(cls):
        """Reset the global state."""
        cls.result_platform = None
        cls.progress_status = None
        cls.result_stats = None
        cls.result_dict = None
        cls.background_image_path = ""
        cls.scene_status = {}
        cls.results_submitted = False
