Comment on Clojure core.async and Go: A Code ComparisonparentComments−JulianMorrison13yI dunno, but I can do it in go :-P func generator(values ...interface{}) func() interface{} { c := make(chan interface{}, len(values)) for _, v := range values { c <- v } return func() interface{} { return <-c } }−sambeau13y"The problem with using a goroutine as a generator is that if you abandon it, it will not get garbage collected."It's also slow.https://groups.google.com/forum/#!topic/golang-nuts/v6m86sTR...−JulianMorrison13yMy design relies on pre-loading the channel's buffer and doesn't use a goroutine.
Comments
I dunno, but I can do it in go :-P
"The problem with using a goroutine as a generator is that if you abandon it, it will not get garbage collected."
It's also slow.
https://groups.google.com/forum/#!topic/golang-nuts/v6m86sTR...
My design relies on pre-loading the channel's buffer and doesn't use a goroutine.