Threads should inherit std streams
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
We store the Lean wrappers of stdin/stdout/stderr in thread-local variables to support redirection as in withStdin/.... New threads spawned within these functions should inherit these variables. Note that if a thread writes to stdout/stderr even after its parent has left the corresponding function, the output will be lost, but it will not otherwise break anything.
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
Begin with the implementation of withStdin/... and the thread-local stdin, stdout, and stderr wrappers, then trace how new threads are spawned. Done means threads created inside these functions inherit the corresponding variables, while the documented output-loss behavior after the parent leaves the function remains possible.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100