 
 (set! batch/ratom-flush flush!)
 
+
 ;;; Atom
 
 (defprotocol IReactiveAtom)


  IDeref
  (-deref [this]
    (when (nil? *ratom-context*)
      (flush!))
    (if (and (nil? auto-run) (nil? *ratom-context*))
      (do
        (when dirty?
          (let [oldstate state]
            (set! state (f))
            (when-not (or (nil? watches) (= oldstate state))
              (notify-w this oldstate state)))))
      (do
        (notify-deref-watcher! this)
        (when dirty?
          (._run this))))
    state)

  IDisposable

  ([x & {:keys [meta validator]}] (RAtom. x meta validator nil)))


;;; track

(declare make-reaction)
