python-trio / python-trio/trio
optional daemonic threads for trio.to_thread.run_sync
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
daemon threads skip cleanup at interpreter shutdown and don't play well with subinterpreters
trio should maintain two pools of threads, daemonic and non-daemonic so trio can push that choice onto users
eg: trio.to_thread.run_sync(fn, daemon=False)
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 at the implementation of trio.to_thread.run_sync and trace how its thread pool is created and managed. Read the existing shutdown behavior and any subinterpreter-related constraints before deciding how the two pools should be maintained. Done means users can select daemon=False or daemon=True, with both choices behaving consistently during cleanup and interpreter shutdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100