     }
     
     func post<E:Event>(_ event: E) {
-        self.synchronized(self.handlers) {
+        self.synchronized {
             if var handlers = self.handlers[E.identifier] {
                 handlers.removeAll { (h) -> Bool in
                     if let handler = h as? EventHandler<E> {

        self.target = target
    }
    
    func async(_ queue: DispatchQueue = DispatchQueue.main, block: @escaping Block) {
        self.queue = queue
        self.block = block
    }

    
    private var handlers: [String: [Any]] = [:]
    
    private let syncKey = 0
    private func synchronized(_ closure: ()->Void) {
        objc_sync_enter(self.syncKey)
        closure()
        objc_sync_exit(self.syncKey)
    }
    
    func sub<E:Event>(_ target: AnyObject, for eventType: E.Type) -> EventHandler<E> {
        let handler = EventHandler<E>(target: target)
        self.synchronized {
            var handlers = self.handlers[eventType.identifier] ?? []
            handlers.append(handler)
            self.handlers[eventType.identifier] = handlers
