dispatchEvent

abstract suspend fun dispatchEvent(event: Any)(source)

Dispatches the given event to the registered listeners.

The event must either be a GenericEvent or a BEvent, passing neither of them is a no-op.

Execution model

This method will block until all BLOCKING listeners, are fired and have returned.

ASYNC listeners will then be launched on BCoroutineScopesConfig.eventDispatcherScope, without blocking.

Finally, SHARED listeners will be sequentially fired on this same coroutine.

Any thrown exception will be logged separately and do not affect other listeners.