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

Inconsistent event emits #4184

Closed
kanongil opened this issue Nov 9, 2020 · 0 comments
Closed

Inconsistent event emits #4184

kanongil opened this issue Nov 9, 2020 · 0 comments
Labels
breaking changes Change that can breaking existing code feature New functionality or improvement

Comments

@kanongil
Copy link
Contributor

kanongil commented Nov 9, 2020

Support plan

  • is this issue currently blocking your project? (yes/no): no
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: n/a
  • module version: 20.0.1
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...):
  • any other relevant information:

This is a followup from comment in #4173 (review).

What problem are you trying to solve?

Have a consistent event interface for Hapi, where event emits cannot delay / abort server processing.

Do you have a new or modified API suggestion to solve the problem?

Don't wait for emit() promise, on server "start" and "stop", and subsequently don't return a promise from events.emit(). This should also enable much better performance, especially for events with no listeners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking changes Change that can breaking existing code feature New functionality or improvement
Projects
None yet
Development

No branches or pull requests

1 participant