From 0c4953f4e3a74bd0f300cbc2352ea1d846590aed Mon Sep 17 00:00:00 2001 From: fff122 Date: Wed, 19 Aug 2026 12:41:03 +0800 Subject: [PATCH] fix: resolve gevent LoopExit and AssertionError crashes monkey.patch_all(thread=False) still patches the queue module, which replaces queue.SimpleQueue used internally by ThreadPoolExecutor with a gevent queue. Worker threads in ThreadPoolExecutor have no gevent hub, causing LoopExit ("This operation would block forever") and AssertionError ("Can only use Waiter.switch method from the Hub greenlet") exceptions during scanning. Adding queue=False preserves the standard queue for ThreadPoolExecutor while keeping gevent's socket/ssl patching for cooperative I/O. --- run_ingram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_ingram.py b/run_ingram.py index 44b23fd..675dd09 100755 --- a/run_ingram.py +++ b/run_ingram.py @@ -6,7 +6,7 @@ #=================== 需放置于最开头 ==================== import warnings; warnings.filterwarnings("ignore") -from gevent import monkey; monkey.patch_all(thread=False) +from gevent import monkey; monkey.patch_all(thread=False, queue=False) #====================================================== import os