Description
If you use gzip_ng_threaded and open a file with multiple threads, any Exceptions thrown will cause Python to hang indefinitely.
This seems to be because the thread lock is never released.
Code to trigger the bug:
from zlib_ng import gzip_ng_threaded as gzip
file_ = gzip.open("Throwaway", "wb", threads=2)
raise Exception("weird")
example output (KeyboardInterrupt was used to quit the program):
~/venv/bin/python ~/testing.py
Traceback (most recent call last):
File "~/testing.py", line 5, in <module>
raise Exception("weird")
Exception: weird
Exception ignored in: <module 'threading' from '/usr/lib/python3.12/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.12/threading.py", line 1622, in _shutdown
lock.acquire()
KeyboardInterrupt:
Process finished with exit code 1
Metadata
Metadata
Assignees
Labels
No labels