Skip to content
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: Explicitly indicate that EventEmitter's listeners will still be invoked if they were removed during the emit cycle #4759

Closed
drjokepu opened this issue Jan 19, 2016 · 1 comment
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors.

Comments

@drjokepu
Copy link

As discussed in nodejs/node-v0.x-archive#7872, EventEmitter's listeners are still called if they are removed during the emit() cycle. It was agreed that this is the intended behavior, however, there is nothing in EventEmitter's documentation that would explicitly indicate that.

I think the documentation needs to be updated to clarify this behavior, because it's not necessarily obvious.

@cjihrig
Copy link
Contributor

cjihrig commented Jan 19, 2016

Documentation patches are welcome.

@Fishrock123 Fishrock123 added doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. labels Jan 19, 2016
dirceu added a commit to dirceu/node that referenced this issue Feb 12, 2016
vaibhav93 added a commit to vaibhav93/node that referenced this issue Feb 12, 2016
This commit updates events doc to describe removeListener behaviour
when it is called within a listener. An example is added to make
it more evident.

A test is also incuded to make this behaviour consistent in future
releases.
fixes nodejs#4759
evanlucas pushed a commit that referenced this issue Mar 14, 2016
This commit updates events doc to describe removeListener behaviour
when it is called within a listener. An example is added to make
it more evident.

A test is also incuded to make this behaviour consistent in future
releases.

Fixes: #4759

PR-URL: #5201

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
rvagg pushed a commit that referenced this issue Mar 16, 2016
This commit updates events doc to describe removeListener behaviour
when it is called within a listener. An example is added to make
it more evident.

A test is also incuded to make this behaviour consistent in future
releases.

Fixes: #4759

PR-URL: #5201

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
MylesBorins pushed a commit that referenced this issue Mar 17, 2016
This commit updates events doc to describe removeListener behaviour
when it is called within a listener. An example is added to make
it more evident.

A test is also incuded to make this behaviour consistent in future
releases.

Fixes: #4759

PR-URL: #5201

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
MylesBorins pushed a commit that referenced this issue Mar 21, 2016
This commit updates events doc to describe removeListener behaviour
when it is called within a listener. An example is added to make
it more evident.

A test is also incuded to make this behaviour consistent in future
releases.

Fixes: #4759

PR-URL: #5201

Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants