-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc: Infinity for emitter.setMaxListeners #2559
doc: Infinity for emitter.setMaxListeners #2559
Conversation
Instead of recommending `0` as the magic value to set max listeners to unlimited, recommend `Infinity`. This paves the way for `0` as a magic value eventually being deprecated and finally removed closes nodejs/node-v0.x-archive#22987
LGTM |
LGTM, but I don't think we need to ever deprecate/remove the use of 0 as magic value. It is a common paradigm. |
One problem with removing references to |
@chrisdickinson I'm okay with documenting 0 for a while. Ideally the whole point of this is for people to move away from using 0 at all. But for a transitional period, it makes sense to keep the old pattern documented. wording updated |
LGTM. |
Instead of recommending `0` as the magic value to set max listeners to unlimited, recommend `Infinity`. This paves the way for `0` as a magic value eventually being deprecated and finally removed. PR-URL: #2559 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Thanks! Landed with some slight modifications to the commit message in 775c01e. |
Instead of recommending `0` as the magic value to set max listeners to unlimited, recommend `Infinity`. This paves the way for `0` as a magic value eventually being deprecated and finally removed. PR-URL: #2559 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com> Reviewed-By: Roman Reiss <me@silverwind.io>
Landed in v4.x with 0cfc6d3 |
Instead of recommending
0
as the magic value to set max listeners to unlimited, recommendInfinity
.This paves the way for
0
as a magic value eventually being deprecated and finally removedoriginal discussion: nodejs/node-v0.x-archive#22987
original PR: nodejs/node-v0.x-archive#25269