Skip to content

fix(io): cancel pending readable stream reads - #34986

Merged
littledivy merged 2 commits into
mainfrom
orch/divybot-517
Jun 7, 2026
Merged

littledivy merged 2 commits into
mainfrom
orch/divybot-517

Conversation

@divybot

@divybot divybot commented Jun 7, 2026 •

Copy link
Copy Markdown
Contributor

Canceling a resource-backed readable stream now asks the backing resource to cancel pending read ops before deciding whether to close the rid. This lets Deno.stdin.readable cancel an outstanding terminal read without closing stdin, so the process can exit normally.

FileResource now rotates its one-shot cancel handle after canceling reads so stdin remains usable for later reads.

Tests:

  • cargo check -p deno_core -p deno_io -p deno_web
  • cargo build -p deno -p test_server
  • cargo test -p integration_tests stdin_readable_cancel_with_pty -- --nocapture
  • ./tools/format.js --check

Closes #34985
Closes denoland/divybot#517

divybot and others added 2 commits June 7, 2026 17:13
@littledivy
littledivy merged commit 53b969f into main Jun 7, 2026
136 checks passed
@littledivy
littledivy deleted the orch/divybot-517 branch June 7, 2026 18:03
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.stdin.readable.getReader().cancel prevents Deno from existing

2 participants