-
Notifications
You must be signed in to change notification settings - Fork 328
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
Blocking call detected #647
Comments
Confirmed replacing the calls (eg the below example) fixes the blocking error:
Let me know if you want me to submit a PR |
I don't really know how the process works, but maybe you should submit PR... |
FIxed in #652 |
I am requesting a revert of this code, see #676 . I think the original report should be clarified: Is really the open() system call a problem, or subsequent calls? It is a very strange limitation of not being able to use "open" in an asyncio application. For long running executions and heavy IO usage, it is possible to yield to event loop with asyncio.sleep(0). |
The ocpp integration (https://github.com/lbbrhzn/ocpp) using this library in Home Assistant 2024.06 has detected that the IO
open
file call inmessages.py
blocks the event loop.Would it make sense in
charge_point.py
to replace calls tovalidate_payload
with the equivalent run in the executor egawait asyncio.get_event_loop().run_in_executor(...,validate_payload,...)
?Or if you have suggestions on how it can be addressed another way that would be great.
Many thanks
The text was updated successfully, but these errors were encountered: