| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument
| setTimeout(function() { | ||
| r.push(str); | ||
| }); | ||
| }, 1); |
There was a problem hiding this comment.
Just wondering, why are we doing these?
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
@nodejs/streams |
Sorry, something went wrong.
Sorry, something went wrong.
* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument PR-URL: #10226 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument PR-URL: #10226 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument PR-URL: #10226 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument PR-URL: #10226 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* use common.mustCall() * specify setTimeout() duration of 1ms * remove unused `n` function argument PR-URL: #10226 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
test stream
Description of change