Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> But due to the unpredictability of the GC, you could be in the middle of a query execution and the GC can kick in.

Yes, that is a possibility. Typically there are two ways to deal with this in a GC'd language: (a) You know that GC is only triggered by certain operations that might allocate, and you avoid those operations in your critical hot section, or (b) you know how to disable the GC temporarily, while you are in that critical hot section. For Go the latter is apparently done by calling this function: https://golang.org/pkg/runtime/debug/#SetGCPercent

I'm not a Go developer myself, but I imagine people developing such low-latency software in Go know about this.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: