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

Callback functions #63

Open
allain opened this issue Oct 5, 2015 · 0 comments
Open

Callback functions #63

allain opened this issue Oct 5, 2015 · 0 comments

Comments

@allain
Copy link
Contributor

allain commented Oct 5, 2015

The use of callback functions when EventEmitters are readily available is problematic since there are limitations that are self imposed by using them.

  • Only one callback can be registered at a time since it's a simple variable.
  • If an error occurs during the processing of the callback, it can halt execution of the thing that's calling the callback, even through the failure of the callback should not directly impact the execution path. For ex: an error during onDisconnect in Worker will stop the "stop" event from ever going out. though technically all operations during the stop call could be done even if the callback had failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant