Is there anyway, to "pierce the deftype"

https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async/impl/channels.clj#L31

to read the "closed" field of the ManytoMany Channel?

That's basically all I need to do.


On Mon, Jan 13, 2014 at 1:47 AM, t x <txrev...@gmail.com> wrote:

> Hi,
>
>   I have the following problem:
>
>   I have a set of channels #{ ... }
>
>   some of the channels are closed, some of the channels are open
>
>   * for the channels that are open, I want to (>! chan msg)
>
>   * for the channels that are closed, I want to remove the channel from
> the hash-set
>
>
> ## Problems:
>
> (1) (>! ... ...) always returns nil, regardless of whether the channel is
> open or closed, and thus useless
>
> (2) I could use (<! ... ) to read from the channel to see if it's nil, but
> then would remove an item from the channel, which I don't want to do
>
>
> ## Question:
>
> Thus, without changing the state of the channel, is there a way to see if
> the channel is open/closed?
>
> Thanks!
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to