MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / get_qsize

Function get_qsize

browser_utils/debug_utils.py:183–187  ·  view source on GitHub ↗
(q: Optional[Union[Queue[Any], SupportsSizeQuery]])

Source from the content-addressed store, hash-verified

181
182 # Helper to safely get queue size
183 def get_qsize(q: Optional[Union[Queue[Any], SupportsSizeQuery]]) -> int:
184 try:
185 return q.qsize() if q else -1
186 except (NotImplementedError, AttributeError):
187 return -1 # Some queue types (like multiprocessing.Queue on macOS) might not support qsize
188
189 # Helper to safely check lock state
190 def is_locked(lock: Optional[Union[Lock, SupportsLockQuery]]) -> bool:

Callers 1

capture_system_contextFunction · 0.85

Calls 1

qsizeMethod · 0.80

Tested by

no test coverage detected