Skip to content

Conversation

@Trott
Copy link
Member

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test stream

Description of change
  • use common.mustCall()
  • specify setTimeout() duration of 1ms
  • remove unused n function argument

* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument
@TrottTrott added stream Issues and PRs related to the stream subsystem. test Issues and PRs related to the tests. labels Dec 11, 2016
@nodejs-github-botnodejs-github-bot added dont-land-on-v7.x test Issues and PRs related to the tests. labels Dec 11, 2016
setTimeout(function(){
r.push(str);
});
},1);
Copy link
Member

Choose a reason for hiding this comment

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

Just wondering, why are we doing these?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Might just be me, but I find an unspecified duration or interval confusing. I always spend a moment wondering if it is a mistake. Did the original author simply forget to provide a value? Did they intend to use setImmediate() or even process.nextTick() instead of setTimeout()? And so on. By making it explicit, we at least make it clear that a 1ms timer is what was intended and not an error.

Copy link
Member

@benjamingrbenjamingr left a comment

Choose a reason for hiding this comment

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

LGTM

@italoacasas
Copy link

@nodejs/streams

@italoacasas
Copy link

@italoacasas
Copy link

Landed b79e83e

CI issue is unrelated.

italoacasas pushed a commit that referenced this pull request Dec 14, 2016
* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument PR-URL: #10226 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 15, 2016
* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument PR-URL: #10226 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
@italoacasasitaloacasas mentioned this pull request Dec 15, 2016
MylesBorins pushed a commit that referenced this pull request Jan 22, 2017
* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument PR-URL: #10226 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument PR-URL: #10226 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument PR-URL: #10226 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
@TrottTrott deleted the big-push branch January 13, 2022 22:44
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streamIssues and PRs related to the stream subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@Trott@italoacasas@benjamingr@targos@MylesBorins@Fishrock123@nodejs-github-bot