Skip to content

Commit

Permalink
In channel datafy, include the chan in meta under :clojure.datafy/obj
Browse files Browse the repository at this point in the history
  • Loading branch information
puredanger committed Mar 4, 2025
1 parent 58ccbff commit 7cc715a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/main/clojure/clojure/core/async/impl/channels.clj
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@
ManyToManyChannel
(datafy [c]
(let [b (.buf c)]
(cond->
{:put-count (count (.puts c))
:take-count (count (.takes c))
:closed? (impl/closed? c)}
b (assoc :buffer (clojure.datafy/datafy b))))))
(with-meta
(cond->
{:put-count (count (.puts c))
:take-count (count (.takes c))
:closed? (impl/closed? c)}
b (assoc :buffer (datafy/datafy b)))
{::datafy/obj c}))))

0 comments on commit 7cc715a

Please sign in to comment.