File tree Expand file tree Collapse file tree
src/main/clojure/clojure/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -165,14 +165,14 @@ IOC and vthread code.
165165 (timers/timeout msecs))
166166
167167(defn- defparkingop-helper [op doc arglist body]
168- (let [as (mapv #(list 'quote %) arglist)
169- blockingop ( -> op name ( str " ! " ) symbol)]
170- `( def ~( with-meta op { :arglists `(list ~as) :doc doc})
171- ( if dispatch/vthreads-available-and-allowed?
172- ( fn [~'& ~'args]
173- ~( list* apply blockingop '[args]))
174- (fn ~arglist
175- ~@body)))))
168+ (let [as (mapv #(list 'quote %) arglist)]
169+ ( list `def ( with-meta op { :arglists `(list ~as) :doc doc})
170+ ( if ( or dispatch/target-vthreads?
171+ ( and dispatch/vthreads-available-and-allowed?
172+ ( not clojure.core/*compile-files*)))
173+ ( let [ blockingop ( -> op name ( str " ! " ) symbol)]
174+ ` (fn [~'& ~'args] ~( list* apply blockingop '[args])))
175+ `( fn ~arglist ~@body)))))
176176
177177(defmacro defparkingop
178178 " Emits either parking op or reimplement as blocking op when vthreads
You can’t perform that action at this time.
0 commit comments