Raiondesu / eventhoven

Event manager that composes events effortlessly 🎵
https://www.npmjs.com/package/eventhoven
MIT License
5 stars 1 forks source link

Do not block handler execution flow by meta-events #41

Closed Raiondesu closed 5 years ago

Raiondesu commented 5 years ago

Describe the bug

It might be considered unexpected behavior when an event awaits all async meta-event-handlers before executing actual event handlers for the event.


To Reproduce Steps to reproduce the behavior:

  1. Create an async function that resolves after {N} seconds
  2. Add it as an async handler to EMIT meta-event
  3. Emit any event
  4. See execution flow being blocked for {N} seconds due to awaiting the execution of the meta-event handler

Expected behavior Expected execution flow to not be blocked by the meta-event.


Environment (please complete the following information):