doc: recommend Infinity on emitter.setMaxListeners
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
048c8f2c4b
commit
775c01e3aa
@ -92,7 +92,7 @@ Returns emitter, so calls can be chained.
|
||||
By default EventEmitters will print a warning if more than 10 listeners are
|
||||
added for a particular event. This is a useful default which helps finding
|
||||
memory leaks. Obviously not all Emitters should be limited to 10. This function
|
||||
allows that to be increased. Set to zero for unlimited.
|
||||
allows that to be increased. Set to `Infinity` (or `0`) for unlimited.
|
||||
|
||||
Returns emitter, so calls can be chained.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user