Yes, channels are GC'd and so are any gos that are connected to them (who are not also being held by some other reference).
Timothy On Thu, Jul 18, 2013 at 9:42 AM, Alice <[email protected]> wrote: > https://github.com/clojure/core.async/blob/master/examples/ex-async.clj > https://github.com/clojure/core.async/blob/master/examples/ex-go.clj > > One uses future, and the other uses go. The code runs query twice for > each search type, and takes only one, whichever comes first, from the > channel, so I'm sure 3 threads are blocked in the future version after > running the code. > > But what about the go version? Is it also leaked? My guess is that because > there's no reference to the channel, it's GC'd. But I'm not sure. > > -- > -- > 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/groups/opt_out. > > > -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- -- 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/groups/opt_out.
