Re: [whatwg/streams] Define valid queuing strategy (#427)

> Can highWaterMark be 0? (what could be the use cases?)

Yes. For example, for a writable stream, this would apply backpressure whenever there is a write pending.

> Can highWaterMark be a float?

Sure.

> A related question: Why does a queuing strategy get an object as argument and not simply a value

This allows better future extensibility and explicitness in the code. It's a bit of a judgment call, but that's where we ended up.

> Also, I think the constructor should raise a TypeError if given a bad highWaterMark value.

I think it's OK since it's validated at stream construction time. It's nice that the queueing strategy classes are just dumb value holders, IMO. It's their consumers who have notions of how they should act.

> I think highWaterMark should be updatable since it might be useful for an AdaptiveQueuingStrategy.

This is actually impossible now due to how we copy the properties in the constructor :-/.

-- 
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/427#issuecomment-268095786

Received on Monday, 19 December 2016 22:22:32 UTC