fix: allow gracefully exit of workers when killed

This commit is contained in:
2026-07-06 22:40:57 +08:00
parent bdc16b19e1
commit 58bd699c3f
+1 -1
View File
@@ -239,7 +239,7 @@ class WorkerThread:
res = ctypes.pythonapi.PyThreadState_SetAsyncExc(
thread_id, ctypes.py_object(_JobKill))
if res <= 1:
del self.thread_pool.all_workers[self]
self.thread_pool.all_workers.pop(self, None)
self.thread_pool.release_full_lock()
return True
else: