2013-09-14 02:30:52 |
Joshua Harlow |
description |
The internals of multiprocessing/pool.py seem to use a thread attribute that doesn't exist when eventlet monkey patches the threading module. The error that I am seeing is the following:
Exception in thread Thread-3:
Traceback (most recent call last):
File "/home/y/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/home/y/lib/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/y/lib/python2.6/multiprocessing/pool.py", line 221, in _handle_tasks
if thread._state:
AttributeError: '_MainThread' object has no attribute '_state'
Likely the eventlet monkey patching does not patch this attribute (is this attribute is a hidden internal of the threading module?). We likely either need to figure out a different pool and use that or pretty clearly document this case and create a threaded impl that will work with eventlet. |
The internals of multiprocessing/pool.py seem to use a thread attribute that doesn't exist when eventlet monkey patches the threading module. The error that I am seeing is the following:
Exception in thread Thread-3:
Traceback (most recent call last):
File "/home/y/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/home/y/lib/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/y/lib/python2.6/multiprocessing/pool.py", line 221, in _handle_tasks
if thread._state:
AttributeError: '_MainThread' object has no attribute '_state'
Likely the eventlet monkey patching does not patch this attribute (is this attribute is a hidden internal of the threading module?). We likely either need to figure out a different pool and use that or pretty clearly document this case and create a threaded impl that will work with eventlet.
Easy way to hit this:
import eventlet
eventlet.monkey_patch(thread=True)
Then try to use the threaded engine. |
|