python-trio / python-trio/trio
document issues with reentrancy in trio guest mode
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
Some host loops like to "reenter" the loop, e.g. in Qt stuff like QDialog.exec, a bunch of utility functions on QFileDialog, QMenu.exec, etc. See also:
- https://www.qt.io/blog/2010/02/23/unpredictable-exec
- https://stackoverflow.com/questions/35561182/why-should-nesting-of-qeventloops-be-avoided
Need to document what happens if you use these from inside a Trio function (not great – does it merely block Trio, or is it catastrophic? at first I thought catastrophic, but maybe it's merely the same as doing any blocking operation), and what to do instead (use alternate APIs, or push them out to run in the host event loop directly and wait for the result from Trio).
Contributor guide
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 with Trio's guest mode documentation and the linked Qt references about nested event loops. Establish whether reentrant host-loop APIs block or disrupt Trio, then document the observed behavior and supported alternatives for invoking them from Trio.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100