Sorry, but you guys didn't understand the problem.
*tbc++*, I don't use core.async, so I don't require it
dgrnbrg, I don't want to interface these libraries together.
Let me try explain again.
1. I have http-kit socket server running
2. When client connects I store its connection (http-kit's AsyncChannel) in
map @clients as a key, line 19 (swap! clients assoc con true)
3. Then when some data received from client line 21-22
(on-receive con (fn [data]
(handler)))
I invoke handler
(defn handler []
(future (let
[merged (merge {} @clients)]
(println merged)) ; => #<ManyToManyChannel
clojure.core.async.impl.channels.ManyToManyChannel@5d9c832a>, but expect to get
copy of @clients
#_(let
[into-map (into {} @clients)] ; here I get exception
<IllegalArgumentException java.lang.IllegalArgumentException: No implementation
of method: :take! of protocol: #'clojure.core.async.impl.protocols/ReadPort
found for class: nil
(println into-map))))
Here I want just to make the copy of @clients with simple merge to empty map,
but I don't get a copied map, I get #<ManyToManyChannel
clojure.core.async.impl.channels.ManyToManyChannel@5d9c832a>
When trying use into I get I get exception.
I just want to know what is going on, why I get ManyToManyChannel instead of
@clients map copy?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.