Await an event from an emitter and resume once the event is emitted.
If the event results any results they are returned as result of the promise.
When the event returns a single result it is returned as single item, when the event emits
Param: eventName
Name of the event to listen to
Param: emitter
Emitter emitting the event
Param: timeout
Optional timeout in ms, if no event is emitted within the timeout an exception os thrown. Defaults to indefinitely
Await an event from an emitter and resume once the event is emitted. If the event results any results they are returned as result of the promise. When the event returns a single result it is returned as single item, when the event emits
Param: eventName
Name of the event to listen to
Param: emitter
Emitter emitting the event
Param: timeout
Optional timeout in ms, if no event is emitted within the timeout an exception os thrown. Defaults to indefinitely