Initialize the Default Event Bus Statically #23

Merged
kske merged 1 commits from f/static-singleton-initialization into develop 2021-10-16 08:33:08 +02:00
Owner

The previous method that used double checked synchronization offers little performance benefits over a plain static initialization.

Reported-by @harkle-the-cake

The previous method that used double checked synchronization offers little performance benefits over a plain static initialization. Reported-by @harkle-the-cake
kske added the
enhancement
label 2021-10-15 08:28:51 +02:00
kske self-assigned this 2021-10-15 08:28:51 +02:00
kske requested review from delvh 2021-10-15 08:28:55 +02:00
delvh approved these changes 2021-10-15 18:45:39 +02:00
@ -53,3 +53,3 @@
public static final int DEFAULT_PRIORITY = 100;
private static volatile EventBus singletonInstance;
private static EventBus singletonInstance = new EventBus();
Owner

final

`final`
kske marked this conversation as resolved
kske force-pushed f/static-singleton-initialization from e3213370aa to 33ebf0302b 2021-10-16 08:32:51 +02:00 Compare
kske merged commit 866a547114 into develop 2021-10-16 08:33:08 +02:00
kske deleted branch f/static-singleton-initialization 2021-10-16 08:33:08 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: zdm/event-bus#23
No description provided.