fix(queue): stop the queue lock from suppressing exceptions

Queue.__exit__ returned _queue_lock, and a truthy __exit__ return suppresses the
exception in flight, so every `with queue_lock:` block discarded exceptions and
resumed with locals from the aborted block unassigned. The bare threading.Lock it
replaced returned None.
This commit is contained in:
CalamitousFelicitousness
2026-08-26 02:00:12 +01:00
parent 3f80bb05b0
commit 78a49eab33
+1 -1
View File
@@ -25,7 +25,7 @@ class Queue:
if _queue_debug:
fn = f'{sys._getframe(3).f_code.co_name}:{sys._getframe(2).f_code.co_name}:{sys._getframe(1).f_code.co_name}' # pylint: disable=protected-access
log.debug(f'Queue: unlock state={_queue_lock.locked()} fn={fn}')
return _queue_lock
# no return: a truthy __exit__ suppresses the exception in flight
queue_lock = Queue() # public lock for external use