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

End cleanup #419

Merged
merged 2 commits into from Dec 8, 2015
Merged

End cleanup #419

merged 2 commits into from Dec 8, 2015

Conversation

@arb
Copy link
Contributor

arb commented Dec 8, 2015

Closes #413. Push null to the data stream for EOF.
Closes #415. Remove "stop" event.

Closes #415. Remove "stop" event.
@arb arb added the breaking changes label Dec 8, 2015
@arb arb added this to the 7.0.0 milestone Dec 8, 2015
@AdriVanHoudt

This comment has been minimized.

Copy link
Contributor

AdriVanHoudt commented Dec 8, 2015

I recommend updating to lab 8 to get the latest linting since you are cleaning up

this._dataStream.push(null);
// Do a nextTick here so that all the streams listening for "end" have a chance to run
// https://github.com/nodejs/node/blob/master/lib/_stream_readable.js#L894-L897
return process.nextTick(callback);

This comment has been minimized.

Copy link
@Marsup

Marsup Dec 8, 2015

Member

Shouldn't that be setImmediate ?

This comment has been minimized.

Copy link
@arb

arb Dec 8, 2015

Author Contributor

Why?

This comment has been minimized.

Copy link
@Marsup

Marsup Dec 8, 2015

Member

Because setImmediate lets IO a chance to run, nextTick doesn't necessarily, I thought it was your intention.

This comment has been minimized.

Copy link
@arb

arb Dec 8, 2015

Author Contributor

I was just flailing tying to figure out why the "end" event wasn't happening, when I added this the "end" event consistently happens. Since technically IO could be happening in the streams, setImmediate makes sense.

@arb arb force-pushed the arb:end-cleanup branch from 837e16d to ef358d9 Dec 8, 2015
arb added a commit that referenced this pull request Dec 8, 2015
End cleanup
@arb arb merged commit f0f1f08 into hapijs:v7.0.0 Dec 8, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@arb arb deleted the arb:end-cleanup branch Dec 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.