-
Notifications
You must be signed in to change notification settings - Fork 19
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
Async all the things that were blocking. #90
Conversation
Note that Home Assistant only checks for open calls, once you find one, please make sure all the read/writes that happen after the open call are also happening in the executor since Home Assistant never checks read/write calls and you will likely never find them again otherwise (and the problem will be much harder to find). |
Is there an way to tell if read/writes are happening? This code is buried deep in the pillow library - hard to know where reads might be happening. Trying to brut force it at the moment looking through code. |
Switched to draft PR until can figure out read/writes. |
strace is usually the best way to verify if a read or write syscall is happening and in which thread |
A few more changes to encapsulate all the PIL calls. While this looks like a big change it is mostly just moving blocks of code around and so that the PIL call could all be put into a single function that is |
There are also a couple of small changes to harden the code.
I've consolidated all the Really, really ready for review! Thanks for your comments @bdraco! Super helpful! |
Looks like its async safe now 👍 At least I don't see anything obvious that is a problem, but its always hard to tell without doing the strace to see where the I/O happens if you don't know all the code in the underlying library (PIL), which I don't |
Thanks @gwww! |
Remove blocking errors that are showing up in Home Assistant. See home-assistant/core#119084