Re: [whatwg/streams] Make read requests abortable (#1103)

For BYOB readers I think we'll need to pass an `AbortSignal` to the underlying source and it has the option of either ignoring the signal or immediately indicating that the read has completed with whatever data has been written into the buffer so far.

As I understand the `AbortSignal` interface it is valid for an API accepting a signal to ignore it. This would be required for an underlying source implementation which passed the buffer to an API which did not support aborting an operation.

As for resolving reads with partial data, it might not be an issue in practice. For the underlying source implementations I maintain (in the Web Serial API and its [polyfill based on WebUSB](https://github.com/google/web-serial-polyfill)) supporting BYOB readers would never create a situation in which the buffer is partially filled as it will be returned immediately to the caller whenever any data is available.

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

Received on Monday, 25 January 2021 22:59:25 UTC