parent
82c66c45ec
commit
872b395374
@ -75,14 +75,15 @@ public final class EventBus {
|
||||
private final Map<Class<?>, TreeSet<EventHandler>> bindings = new ConcurrentHashMap<>();
|
||||
|
||||
/**
|
||||
* Registered listeners.
|
||||
* Stores all registered event listeners (which declare event handlers) and prevents them from
|
||||
* being garbage collected.
|
||||
*
|
||||
* @since 0.0.1
|
||||
*/
|
||||
private final Set<Object> registeredListeners = ConcurrentHashMap.newKeySet();
|
||||
|
||||
/**
|
||||
* Thread-local dispatch state.
|
||||
* The current event dispatching state, local to each thread.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
|
@ -4,7 +4,7 @@ package dev.kske.eventbus.core;
|
||||
* This unchecked exception is specific to the event bus and can be thrown under the following
|
||||
* circumstances:
|
||||
* <ul>
|
||||
* <li>An event handler throws an exception (which is stores as the cause)</li>
|
||||
* <li>An event handler throws an exception (which is stored as the cause)</li>
|
||||
* <li>An event listener with an invalid event handler is registered</li>
|
||||
* <li>{@link EventBus#cancel()} is invoked from outside an active dispatch thread</li>
|
||||
* </ul>
|
||||
|
Loading…
Reference in New Issue
Block a user