-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix(asyncify): avoid hanging process under certain conditions #1853
fix(asyncify): avoid hanging process under certain conditions #1853
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I assume getting a test setup for this would be difficult?
1515486
to
e166164
Compare
I added a test that I can confirm fails on I was concerned that since Let me know what you think. |
looks like the test is failing is CI, I'm surprised there isn't any output from the subprocess? 🤔 |
545f4c2
to
a5e8a57
Compare
a5e8a57
to
61f95b3
Compare
I think it was because I foolishly added the |
ahhh good catch, looks like it's not in the lock file anymore, you'll need to update it with |
@RobertCraigie, rye sync done! |
@RobertCraigie is there anything else that you need for this? This fix enables us to run our automated AI tasks in github workflows and we are holding off on deploying until this is merged. I'm trying to gauge how much effort to put into workarounds based on timelines... |
Thanks! |
Changes being requested
This is a follow on PR for #1828 that updates the
asyncify
method to useasyncio.to_thread
for python 3.9+ or a copy of the source code for the same for python 3.8. This was done sinceto_thread
was only added toasyncio
in python 3.9.This addresses an issue where the code would hand with a left-over, non-daemon thread from
anyio
in certain contexts.Additional context & links
#1827
#1828