Most recently, did the for {select {case foo, ok <- channel: ... }} thing and forgot to bail if !ok (channel closed).
-
-
-
I was allocating ~20 bytes there and my logs didn't even get enough time to write "That channel closed early, hmm" before memory exhausted.
- 4 more replies
New conversation -
-
-
@patio11 best to avoid things that allocate in tight loops...Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@patio11 Is it a golang design choice that the GC doesn't suspend your for-loop thread when under pressure?Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.