Skip to content

Commit

Permalink
chore: Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
TatuJLund committed Oct 18, 2024
1 parent 5e61db1 commit 12529ee
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,25 @@ public void eventFired(Object event) {
@Override
public void detach() {
super.detach();
// Unregister this UI instance from the event bus when it is detached
getEventBus().unregisterEventBusListener(this);
}

/**
* Retrieves the singleton instance of the EventBus.
*
* @return the EventBus instance
*/
private EventBus getEventBus() {
return EventBus.get();
}

/**
* Retrieves the ExecutorService instance, initializing it if necessary. The
* executor is used to run background tasks.
*
* @return the ExecutorService instance
*/
public ExecutorService getExecutor() {
if (executor == null) {
executor = Executors.newSingleThreadExecutor();
Expand Down

0 comments on commit 12529ee

Please sign in to comment.