Welcome! Please see the About page for a little more info on how this works.

0 votes
in core.async by

Parking inside binding block removes current values of dynamically bound vars.

Example:

`
(require '[clojure.core.async :as async :refer [go <!]])</p>

(def ^:dynamic d)

(go
(binding [d :bound]

(println d)
(<! (async/timeout 10))
(println d)))

`

Here is the output:

`

:bound

object[clojure.lang.Var$Unbound 0x15f8a952 Unbound: #'user/d]

`

3 Answers

0 votes
by

Comment made by: monorok

I found an easier way to reproduce the problem:

`
(require '[clojure.core.async :as async :refer [go <!]])</p>

(def ^:dynamic d)

(go
(binding [d :bound]

(println d)
(<! (async/timeout 10))
(println d)))

`

The output:

`
:bound

object[clojure.lang.Var$Unbound 0x15f8a952 Unbound: #'user/d]

`

Unfortunately I don't know how to edit the description of an issue.

0 votes
by

Comment made by: bronsa

I've edited the description for you

0 votes
by
Reference: https://clojure.atlassian.net/browse/ASYNC-203 (reported by alex+import)
...