 
 (defn parallel-env-base []
   {::pc/indexes           @pindexes
-   ::pc/resolver-dispatch resolver-fn
+   ::pc/resolver-dispatch resolver-fn-p
    ::pt/trace*            trace
    ::p/entity             (atom {})
    ::pp/key-watchers      (atom {})

   2 "b"
   3 "c"})

(defresolver 'i->l
  {::pc/input  #{:i}
   ::pc/output [:l]
   ::pc/batch? true}

(defn parallel-env [key]
  (assoc (parallel-env-base) :ast (p/query->ast1 [key])))

#?(:clj
   (defn call-parallel-reader [env key]
     (reset! trace [])
     (let [res (pc/parallel-reader (merge (parallel-env key) {::p/path [key]} env))]
       (if (::pp/response-stream res)
         (update res ::pp/response-stream (fn [x] (async/<!! (async/into [] x))))
         res))))

(defn comparable-trace [trace]
  (mapv #(dissoc % ::pt/timestamp ::pt/id) trace))

(defn comparable-trace-in-any-order [trace]
  (frequencies (comparable-trace trace)))

#?(:clj
   (deftest test-parallel
