leanprover / leanprover/lean4

Threads should inherit std streams

Open
#426 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement P-low
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.