Go blocks are GC'd but not until they complete running. The problem is that you're creating go blocks faster than they can run. Creating go blocks is very cheap, taking/putting into channels is also cheap but not quite as cheap. Therefore the outer loop will eventually allocate so many blocks that you're run OOM.
Timothy On Sat, Jul 6, 2013 at 10:19 AM, MikeM <michael.messini...@invista.com>wrote: > > On Saturday, July 6, 2013 11:46:51 AM UTC-4, David Nolen wrote: >> >> This isn't a bug, you're in a infinite loop constructing go blocks. You >> should probably move the loops into the go blocks. >> >> I assumed go blocks are garbage collected when they go out of scope, but > maybe I don't understand the scope of a go block. You're saying every go > block created in the loop should be expected to hang around indefinitely? > My (possibly broken) thinking was that after the first iteration, whatever > is constructed by the go blocks in the first iteration would be candidates > for garbage collection. > > > > -- > -- > 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.