Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for stdio.readLine #301

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add support for stdio.readLine #301

wants to merge 1 commit into from

Conversation

orpos
Copy link

@orpos orpos commented Feb 20, 2025

Implementes the stdio.readLine function in stdio using a Buffer.
Also changed stdio.readToEnd to use Buffers too.

In a nutshell, it uses a Mutex to mantain only one instance of the buffer for safety, there can only be a single STDIN by process anyhow. It does not block the entire tokio runtime neither "misses reads" (I did not get exactly what you've meant by this though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant