Currently, there is the emit()
/emitSerial()
that allows the emitter (emitting side) to specify if the event's processing should be awaited or not (eq. serial processing or not). I would like to argue that most of the time the emitter does not know and understand in what context are the events processed and if serial/parallel processing should be used, instead the listener is aware of this.
I would like to propose similar functionality on the listener side with functions on()
and new onSerial()
.
I see it that when listener is registered with onSerial()
, there would be a specific queue created for this listener which upon emit()
would the emitted data be pushed to this queue.
A thing I am not so sure about is how it should behave for all the combinations of emit()
/emitSerial()
and on()
/onSerial()
, but that can be though out if this proposition would get traction.
Please let me know your thoughts, happy to write PR for this.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too