Re: [whatwg/streams] Add WritableStreamDefaultController.releaseBackpressure() (PR #1190)

So basically if you're doing a sync transform, you should use HWM = 0, but an async transform should use HWM = 1 (or higher)? That's rough for web developers. I guess the conservative default is to stick with 1 and tell people to customize for sync transforms...

Maybe we could make it better in the future with something like `TransformStream.fromSyncMap(x => y)`, but I dunno, then you might want to have flush logic...

> Alternative names I've thought of

I like `markReady()` since the `ready` promise is the existing developer-facing manifestation of backpressure. I agree it's hard to communicate the conditional nature of the API, without a long name.

-- 
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/pull/1190#issuecomment-984068901

Received on Wednesday, 1 December 2021 21:27:00 UTC