-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 <[email protected]> Reviewed-By: targos - Michaël Zasso <[email protected]> Reviewed-By: Brendan Ashworth <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
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 <[email protected]> Reviewed-By: targos - Michaël Zasso <[email protected]> Reviewed-By: Brendan Ashworth <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
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