Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Incompatibility with multiprocessing.pool in Python 2.7.x #147
Comments
temoto
added
importance-bug
need-contributor
need-test
labels
Oct 13, 2014
smtakeda
commented
Feb 1, 2016
|
I came across the same error in Python 3.4.3 on Centos 6.5 Here is a test case:
|
This was referenced Mar 5, 2016
booxter
commented
Nov 15, 2017
|
When we monkey patch, we get _MainThread from current_thread call. But when we don't monkey patch, we get a proper Thread that got its _state attribute assigned inside init of the ThreadPool. In this init, when self._worker_handler is initialized, it gets back a proper Thread object on which we set the _state attribute to RUN, but when we then call current_thread, we don't get the object but _MainThread, so the state is not there. |
karthikvadla
commented
Dec 9, 2017
•
|
@booxter @julkiewicz You guys found any fix for above. ?
I have celery task which makes call to some other non-celery task.
|
LingxianKong
commented
Jan 3, 2018
|
I met with the same problem in openstack, when using kubernetes python client(which is using multiprocessing.pool to send api request) in an oslo service(which is based on eventlet) |
hoangphuocbk
commented
Jan 4, 2018
|
I also met the same error, when I use kubernetes python client in OpenStack, it raise problem in multiprocessing. |
julkiewicz commentedOct 12, 2014
I get the following error when using eventlet together with gunicorn. This happens upon attempt to gracefully terminate a worker process:
Indeed,
multiprocessing.poolseems to be based on a non-public property_statewhich seems to have three possible statesRUNCLOSEandTERMINATE. Not sure what is the difference betweenCLOSEandTERMINATE. The appropriate fix would probably be to implement_stateas an assignable property somehow.