OpenCyphal / pycyphal

Python implementation of the Cyphal protocol stack.
https://pycyphal.readthedocs.io/
MIT License
117 stars 105 forks source link

DiagnosticPublisher attempts to use the main asyncio event loop from worker threads (which fails) #336

Open pavel-kirienko opened 2 months ago

pavel-kirienko commented 2 months ago

Here, the call to ensure_future is invalid because emit can be invoked from any thread while we must use the asyncio loop from the node thread:

https://github.com/OpenCyphal/pycyphal/blob/40e14821285f48ad997cb3f7a8457d79a88db082/pycyphal/application/diagnostic.py#L187

Related: #334