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

fix: process.stdin.pause() #28525

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

Conversation

littledivy
Copy link
Member

Attempt 2 at fixing process.stdin pause.

Currently, there is no way to pause ongoing reads. This PR adds op_io_read_stop that races against the blocking read task essentially like a CancelHandle but resets for every read.

I don't think this is the right fix yet, there are still fundamental differences and assumption that read ops are always active and don't pause. This sometimes causes readStop() to prematurely exit as the event loop sees there are no tasks left.

Fixes #26403

@ry
Copy link
Member

ry commented Mar 17, 2025

can you check if this also fixes #28530 ?

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.

deno run -A npm:create-hono@latest doesn't exit after creating
2 participants