> The key thing to remember in all questions of core.async GC is that there is > no global "blocked gos" queue. Instead, the blocked "gos" are attached > directly to the channel. When the channel is GC'd all attached gos are GC'd > as well.
This is the source of all my mis-understanding. Thanks for explaining! > > So in this case, it's actually even simpler.....the go never blocks. What > this code is doing is creating a channel to return from the go. This channel > has a buffer size of 1. It then puts a channel into the channel. The go then > exits and is GC'd. Once the return channel is discarded by the caller of > this code, both channels are also GC'd > > Timothy > > > On Thu, Jan 30, 2014 at 11:24 AM, t x <txrev...@gmail.com> wrote: >> >> Hi, >> >> Consider this block of code: >> >> (async/go (async/chan)) >> >> This creates a go-thread and a go-chan. >> >> The go-thread is linked from the list of blocked go-threads. >> >> The go-chan is linked from the go-thread. >> >> Thus, did we just create a go-thread and a go-chan which is NOT gc-ed at >> all? >> >> 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. > > > > > -- > "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 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. -- 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.