> However, if what one is trying is to *stop* putting values on the 
channel, I see no possible race conditions.

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. So if 
you're the only writer, then you know if you've closed the channel or not. 
If there are multiple writers, then need to be coordinated in some way. 
Typically, they would alt! against reading from a control channel and 
writing to the output channel. When you get a shutdown signal from the 
control channel, you stop writing.

-- 
-- 
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