mirror of
https://github.com/jorhelp/Ingram.git
synced 2026-10-16 21:20:40 +08:00
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.
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user