gevent中发生了线程异常

时间:2014-08-30 06:26:41

标签: gevent

当我运行下面的代码时,很长一段时间会出现这种错误。

代码:

from gevent import monkey; monkey.patch_all()
from gevent.pywsgi import WSGIServer 
sys.modules.pop("threading", None) 

异常信息:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 375, in _notify_links
    link(self)
  File "/usr/local/lib/python2.7/dist-packages/gevent/threading.py", line 22, in _cleanup
    __threading__._active.pop(id(g))
KeyError: 40406544
(<function _cleanup at 0x1fed0c8>, <Greenlet at 0x2688e10>) failed with KeyError

0 个答案:

没有答案