     internal var listeners = [EventListener<EventType>]()
     public typealias EventListenerClosure = (_ event: EventType) -> Void
     fileprivate var sticky: EventType?
-    fileprivate let editListenersSemaphore = DispatchSemaphore(value: 1)
-    fileprivate let stickySemaphore = DispatchSemaphore(value: 1)
+    fileprivate let editListenersMutex = Mutex()
+    fileprivate let stickyMutex = Mutex()
 
 }
 

public protocol Event: BaseEvent {}
public protocol StickyEvent: BaseEvent {}

public class SwenStorage {

    fileprivate var buses = [AnyObject]()
    fileprivate let instanceSemaphore = DispatchSemaphore(value: 1)

    static public let defaultStorage = SwenStorage()


    }

    func postToAll(_ event: EventType) {
        editListenersMutex.wait()
        defer { editListenersMutex.signal() }
        listeners.forEach { $0.post(event, async: editListenersMutex.value <= 0) }
    }

    func unregister(_ observer: AnyObject) {
        editListenersMutex.wait()
        defer { editListenersMutex.signal() }
        let pointer = UnsafeRawPointer(Unmanaged.passUnretained(observer).toOpaque())
        listeners = listeners.filter { $0.observerPointer != pointer }
    }

}
