 					synchronized(self.lock) {
 						subscription.callback = nil
 
-						if let subscriptions = self.subscriptionsByScope[scope] as! Subscriptions<T>? {
+						if let subscriptions = self.subscriptionsByScope[scope] as! Subscriptions<Event>? {
 							subscriptions.list.removeFirstIdentical(subscription)
 
 							if subscriptions.list.isEmpty {

	}


	public func subscribe<T>(callback: (T) -> Void) -> Closure {
		return synchronized(lock) {
			let scope = ObjectIdentifier(T.Type)
			let subscription = Subscription(callback: callback)

			if let subscriptions = subscriptionsByScope[scope] as! Subscriptions<T>? {
				subscriptions.list.append(subscription)
			}
			else {
				let subscriptions = Subscriptions<T>()
				subscriptions.list.append(subscription)
				subscriptionsByScope[scope] = subscriptions
			}

						}
					}
				}
			}
		}
	}



	public final class Consumer {

		private let lock = EmptyObject()
		private var unsubscribes = [Closure]()


		public init() {}


		deinit {
			unsubscribeAll()
		}


		public func subscribe<Event>(to eventBus: EventBus, callback: (Event) -> Void) {
			synchronized(lock) {
				unsubscribes.append(eventBus.subscribe(callback))
			}
		}


		public func unsubscribeAll() {
			synchronized(lock) {
				for unsubscribe in unsubscribes {
					unsubscribe()
				}

				unsubscribes.removeAll(keepCapacity: false)
			}
		}
	}
