Skip to content

Commit

Permalink
4.0.2 - Bug Fix
Browse files Browse the repository at this point in the history
Fixed a bug in `EventThread` for method `removeEventCallback` where it was declared with an incorrect parameter type for `forEventType`.
  • Loading branch information
LK-Simon committed Aug 16, 2022
1 parent 8237d09 commit 75eb253
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/EventDrivenSwift/EventThread/EventThread.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ open class EventThread: EventReceiver, EventThreadable {
/**
Removes an Event Callback for the given `Eventable` Type
- Author: Simon J. Stuart
- Version: 4.0.0
- Version: 4.0.2
- Parameters:
- forEventType: The `Eventable` Type for which to Remove the Callback
*/
open func removeEventCallback(forEventType: any Eventable) {
open func removeEventCallback(forEventType: Eventable.Type) {
let eventTypeName = String(reflecting: forEventType)

_eventCallbacks.withLock { eventCallbacks in
Expand All @@ -98,7 +98,7 @@ open class EventThread: EventReceiver, EventThreadable {

let dispatcher: EventDispatching = eventPool == nil ? EventCentral.shared : eventPool!

dispatcher.removeReceiver(self, forEventType: type(of: forEventType))
dispatcher.removeReceiver(self, forEventType: forEventType)
}

/**
Expand Down

0 comments on commit 75eb253

Please sign in to comment.