mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-23 21:25:57 +08:00
Fix: [ALAS] Worker might graceful exited after killing
it cleaned up itself, so main thread can't delete it
This commit is contained in:
@@ -275,7 +275,7 @@ class WorkerThread:
|
|||||||
res = ctypes.pythonapi.PyThreadState_SetAsyncExc(
|
res = ctypes.pythonapi.PyThreadState_SetAsyncExc(
|
||||||
thread_id, ctypes.py_object(_JobKill))
|
thread_id, ctypes.py_object(_JobKill))
|
||||||
if res <= 1:
|
if res <= 1:
|
||||||
del self.thread_pool.all_workers[self]
|
self.thread_pool.all_workers.pop(self, None)
|
||||||
self.thread_pool.release_full_lock()
|
self.thread_pool.release_full_lock()
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user