Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call pull when needsMore is true #169

Closed
wants to merge 1 commit into from

Conversation

domenic
Copy link
Member

@domenic domenic commented Aug 7, 2014

I'm creating this pull request so I can comment on it; apparently you can't comment on things without them being pull requests :P

1. Set `this.[[pulling]]` to **false**.
1. Let _queueSize_ be GetTotalQueueSize(`this.[[queue]]`).
1. Let _needsMore_ be ToBoolean(Invoke(`this.[[strategy]]`, `"needsMore"`, (_queueSize_))).
1. Let _needsMore_ be the result of calling `this`.[[getNeedsMore]].
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be this.[[getNeedsMore]]() (the () being the important part)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@tyoshino
Copy link
Member

tyoshino commented Aug 8, 2014

I'm creating this pull request so I can comment on it; apparently you can't comment on things without them being pull requests :p

Oh, thanks. I'll do so from next time.

Now, I'll add reference implementation changes to this patch.

@tyoshino
Copy link
Member

tyoshino commented Aug 8, 2014

[[XXX]]() gets parsed as a Markdown link grammar. Thinking of replacement.

@tyoshino
Copy link
Member

tyoshino commented Aug 8, 2014

Thinking of replacement

Rewrote to

the [[Call]] internal method of [[getNeedsMore]] passing the this value as thisArgument and an empty List as argumentsList

but looks too verbose. Maybe I can just write getNeedsMore as an abstract operation (#161).

@domenic
Copy link
Member Author

domenic commented Aug 8, 2014

You can just use \[\[XXX\]\](). In fact you can probably just insert a random \ anywhere in there and it will work.

the [[Call]] internal method of [[getNeedsMore]] passing the this value as thisArgument and an empty List as argumentsList

Heh, see, this is bad, because [[getNeedsMore]] should not really be a function, so it does not/should not have a [[Call]] internal method. This is exactly the kind of confusion that #161 is meant to avoid. I wish I had just done that from the start.

@tyoshino
Copy link
Member

[XXX]

Done and added reference-implementation files.

@@ -272,6 +283,15 @@ export default class ReadableStream {
if (this._pulling === true) {
return;
}

try {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't want to try/catch here; ReturnIfAbrupt just means letting the error bubble. Will fix while merging.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Thanks

@domenic
Copy link
Member Author

domenic commented Aug 14, 2014

Pushed with minor fixes to https://github.com/whatwg/streams/tree/pull-needs-more but as per https://github.com/whatwg/streams/pull/169/files#r16258931 the new need to add strategies everywhere is worrying. I don't understand why these changes should cause the stream piping to stall with a zero high-water-mark.

@tyoshino tyoshino force-pushed the callpullonneedsmore branch from 0e688b7 to 93ce989 Compare August 20, 2014 08:00
@tyoshino tyoshino closed this Aug 20, 2014
@tyoshino tyoshino deleted the callpullonneedsmore branch August 20, 2014 08:06
@tyoshino
Copy link
Member

Thanks. Please see the inlined comment about the issue with pipeThrough().

Here's a sample of fix for pipeThrough() though I'm still investigating if this is the right thing to do.
tyoshino@8b20a91

@tyoshino
Copy link
Member

Note: This pull req is for #153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants