Comment 0 for bug 1225275

Revision history for this message
Joshua Harlow (harlowja) wrote :

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.