exaai-agent 2.0.8__py3-none-any.whl → 2.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -77,11 +77,13 @@ class SmartFuzzer:
77
77
  """
78
78
 
79
79
  _instance: Optional["SmartFuzzer"] = None
80
+ _lock = __import__("threading").Lock()
80
81
 
81
82
  def __new__(cls) -> "SmartFuzzer":
82
- if cls._instance is None:
83
- cls._instance = super().__new__(cls)
84
- cls._instance._initialized = False
83
+ with cls._lock:
84
+ if cls._instance is None:
85
+ cls._instance = super().__new__(cls)
86
+ cls._instance._initialized = False
85
87
  return cls._instance
86
88
 
87
89
  def __init__(self):
@@ -76,11 +76,13 @@ class VulnValidator:
76
76
  """
77
77
 
78
78
  _instance: Optional["VulnValidator"] = None
79
+ _lock = __import__("threading").Lock()
79
80
 
80
81
  def __new__(cls) -> "VulnValidator":
81
- if cls._instance is None:
82
- cls._instance = super().__new__(cls)
83
- cls._instance._initialized = False
82
+ with cls._lock:
83
+ if cls._instance is None:
84
+ cls._instance = super().__new__(cls)
85
+ cls._instance._initialized = False
84
86
  return cls._instance
85
87
 
86
88
  def __init__(self):