You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stream/iter: pull() with AbortSignal hangs while awaiting source next() #63497
import{pull}from'node:stream/iter';constsource={async*[Symbol.asyncIterator](){awaitnewPromise(()=>{});},};constac=newAbortController();constiterator=pull(source,{signal: ac.signal})[Symbol.asyncIterator]();constnext=iterator.next().then(()=>'settled: fulfilled',(err)=>`settled: rejected with ${err.name}: ${err.message}`,);ac.abort();console.log(awaitPromise.race([next,newPromise((resolve)=>setTimeout(resolve,100,'still pending after abort')),]));
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
settled: rejected with AbortError: This operation was aborted
Passing { signal } to pull() should let them stop the pipeline even when the source is idle or waiting for more data.
What do you see instead?
still pending after abort
The no-transform path remains stuck until the source eventually yields, so aborting does not actually abort the pending read.
Activity
trivikr commentedon May 25, 2026
The current behavior is spec compliant.
I opened a question in the specification before making an implementation change at WinterTC55/iter-streams#15
stream: reject pull() reads on abort
stream: reject pull() reads on abort
stream: reject pull() reads on abort