Re: [whatwg/streams] ReadableStreamBYOBReader.prototype.readFully(view) (#1143)

We ended up with a slightly different approach for #1103. Instead of adding a new API that accepts an `AbortSignal`, we changed the behavior of `reader.releaseLock()`. So the above example would look like this:
```javascript
const reader = readable.getReader({ mode: 'byob' });

const signal = AbortSignal.timeout(10_000);
signal.addEventListener('abort', () => reader.releaseLock());
// Or alternatively:
setTimeout(() => reader.releaseLock(), 10_000);

// Use reader as normal
const { done, value } = await reader.read(new Uint8Array(1024), { atLeast: 32 });
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1143#issuecomment-1012846977
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/issues/1143/1012846977@github.com>

Received on Friday, 14 January 2022 07:36:09 UTC