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
Is it intended by the spec that breaking async iteration of a teed stream halts the execution of the program until all branches are cancelled?
constrs=newReadableStream({start(controller){leti=0;constinterval=setInterval(()=>{controller.enqueue(i++);},100);// Clean up when canceledthis._cancel=()=>{clearInterval(interval);console.log('cancelled');};},cancel(reason){console.log('cancel() called with',reason);this._cancel?.();returnPromise.resolve();},});const[r1,r2]=rs.tee();leti=0;(async()=>{forawait(constvalofr1){console.log('r1',val);if(i++>2){console.log('breaking r1');break;}}console.log('finished r1 loop');})();
Right now in all environments I tested in (browsers and across NodeJS versions) the last log I get is "breaking r1" - finished r1 loop never gets logged