New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stuck in waiting for results of AsyncResult #1739
Comments
It is not safe, and never has been safe, to use an It may be possible to make this specific example work, but that's due to the very constrained way in which it uses There is an object that can be used to pass results from one thread to another: Another thing that may be possible to do here is print an error message. That's tricky, though, because the situation isn't actually unrecoverable, so we can't be sure that the internal issue is actually a hard error. |
For reference, what's happening is that gevent is now more careful about which hub gets associated with objects like these, and it detects the fact that it's being used across threads and refuses to try to use a hub for a one thread in a call from a different thread here. Previously, there was no such check (meaning, operating on an |
Thanks for the instructions. We decide to use other methods to communicate between threads. |
In addition to the two missing tests mentioned in test__event, I need to see if I can get a semaphore in this situation.
Description:
We need to receive results from an AsyncResult object inside a thread hosted by
gevent.threadpool.ThreadPool
and it works ongevent<=20.9.0
. However, ongevent==20.12.x
it stucks.Adding
from gevent import get_hub; get_hub()
makes no difference.What I've run:
Minimal code to reproduce the issue. The code works in
20.9.0
but get stuck in20.12.0
and20.12.1
.The text was updated successfully, but these errors were encountered: