Skip to content

Commit 0dceb16

Browse files
committed
EventHandler.init no longer pre-creates Priority Queues
Removed the code to pre-prepare all of the Priority Queues and Stacks from `EventHandler`. This means that only Priority Queues and Stacks existing will be those which actually contain `Eventable` objects waiting to be processed. Ultimately, this speeds up iteration by eliminating the empty Priority Queues/Stacks. If it is iterated, it contains an `Eventable` to process.
1 parent f5dc426 commit 0dceb16

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Sources/EventDrivenSwift/EventHandler/EventHandler.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,6 @@ open class EventHandler: ObservableThread, EventHandlable {
177177

178178
override init() {
179179
super.init()
180-
for priority in EventPriority.allCases {
181-
queues[priority] = [any Eventable]()
182-
stacks[priority] = [any Eventable]()
183-
}
184180
start()
185181
}
186182
}

0 commit comments

Comments
 (0)