File tree Expand file tree Collapse file tree 1 file changed +1
-28
lines changed
src/main/clojure/clojure/core Expand file tree Collapse file tree 1 file changed +1
-28
lines changed Original file line number Diff line number Diff line change @@ -511,36 +511,9 @@ IOC and vthread code.
511
511
(let [ret (impl/take! port (fn-handler nop false ))]
512
512
(when ret @ret)))
513
513
514
- (defn- require-in-new-binding-context
515
- " Like require but takes only a single namespace symbol and attempts to
516
- require the namespace on a separate thread. This is done to start
517
- with a fresh dynamic environment augmented only with the vars
518
- needed by require to perform its job. If the namespace is
519
- found to have already been loaded then this function will return
520
- immediately."
521
- [nsym]
522
- (when (not (contains? @@#'clojure.core/*loaded-libs* nsym))
523
- (let [p (promise )
524
- n *ns*
525
- ll @#'clojure.core/*loaded-libs*]
526
- (dispatch/exec
527
- (^:once fn* []
528
- (try
529
- (let [result (binding [*ns* n
530
- clojure.core/*loaded-libs* ll]
531
- (#'clojure.core/serialized-require nsym))]
532
- (deliver p result))
533
- (catch Throwable t
534
- (deliver p t))))
535
- :io )
536
- (let [res @p]
537
- (if res
538
- (throw res)
539
- res)))))
540
-
541
514
(defn- go* [body env]
542
515
(cond (not dispatch/target-vthreads?)
543
- (do (require-in-new-binding-context 'clojure.core.async.impl.go)
516
+ (do (require 'clojure.core.async.impl.go)
544
517
((find-var 'clojure.core.async.impl.go/go-impl) env body))
545
518
546
519
(or dispatch/vthreads-available-and-allowed? clojure.core/*compile-files*)
You can’t perform that action at this time.
0 commit comments