 
     // 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

public class ObserverOf<T>: TypedObservable {
    // MARK: Public properties
    public typealias Value = T

    public private(set) var value: T



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