(Sorry for brevity, on my phone)
Querying the state of a channel at worst leads to race conditions and at best leads to bad design.
You're only supposed to close a channel from the producer side.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@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 a topic in the Google Groups "Clojure" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/_KzEoq0XcHQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure+u...@googlegroups.com.
This brings up another issue: Currently writing to a closed channel is a no-op, but it probably should throw an exception. Similarly, closing a closed channel is a no-op, but also probably should throw an exception. Both are things that a well behaved sender should never do, since they know when they close, so they know not to keep putting stuff in there. Or, they are warned of the impending close by some coordination process & the same rules apply.