OpenCyphal / OpenCyphal/pycyphal
DiagnosticPublisher attempts to use the main asyncio event loop from worker threads (which fails)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 142
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
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:
Related: #334
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in pycyphal/application/diagnostic.py around emit and the ensure_future call referenced in the issue. Check how the node thread's asyncio loop is obtained and how emit may be invoked from worker threads; done means scheduling works from those threads without using the loop directly from the wrong thread, with relevant behavior covered by the existing test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100