     @inline(__always)
     private func unsubscribe(for key: Key) {
         buffer.modify { buffer in
-            for index in buffer.entries.startIndex..<buffer.entries.endIndex where buffer.entries[index].key == key {
-                buffer.entries.remove(at: index)
+            for index in buffer.subscriptions.startIndex..<buffer.subscriptions.endIndex where buffer.subscriptions[index].key == key {
+                buffer.subscriptions.remove(at: index)
                 break
             }
         }

                }
            }
            
            buffer.entries.append((key: key, observer: observer))
            return disposable
        }
    }


private extension Dispatcher.Disposable {
    final class Scope {
        private var disposables = ContiguousArray<Dispatcher.Disposable>()
        
        static func += (scope: Dispatcher.Disposable.Scope, disposable: Dispatcher.Disposable) {
            scope.disposables.append(disposable)
        }
        
        deinit {
            for disposable in disposables {
                disposable.dispose()
            }
        }
    }
}

private struct DispatcherContext {
    static let shared = DispatcherContext()
    
    private var dispatchers = Atomic([Identifier: Any]())
