 
     // MARK: Private properties
 
-    private var observers: [UInt64: (T, ReadTransaction?) -> Void]
+    private var observers: [UInt64: (thread: CallbackThread, callback: Callback)]
     private var nextObserverToken = UInt64(0)
 
     // MARK: Object lifecycle


    private func onValueSet(newValue: T, transaction: ReadTransaction?) {
        for (_, observer) in observers {
            observer(newValue, transaction)
        }
    }
}

        disposeBag.dispose()
    }

    // MARK: Public methods

    public func didChange(thread: CallbackThread = .CallingThread, callback: (T, ReadTransaction?) -> Void) -> Disposable {

        let token = nextObserverToken
        observers[token] = (thread, callback)
        nextObserverToken += 1

        return BasicDisposable { [weak self] in
