On Thu, Jul 6, 2017 at 12:41 PM, <
ken.kof...@gmail.com> wrote:
> Within the release notes for Go 1.9 it is stated:
> "Library functions that used to trigger stop-the-world garbage collection
> now trigger concurrent garbage collection. Specifically, runtime.GC,
> debug.SetGCPercent, and debug.FreeOSMemory, now trigger concurrent garbage
> collection, blocking only the calling goroutine until the garbage collection
> is done."
> Does this mean that the automatic Garbage Collector, which I am guessing,
> calls these library functions,
The GC does not call these library functions. The GC has been
concurrent since Go 1.5[0] and has seen a bunch of improvements in
subsequent releases as well.
> always triggers concurrent Garbage
> collection? And that STW pauses have been eliminated from golang entirely?
Most of the work the GC does is concurrent with user code, but there
is still a STW phase. It has been shortened considerably in the last
few releases; the Go 1.8 release notes say[1]:
> Garbage collection pauses should be significantly shorter than they were in Go 1.7, usually under 100 microseconds and often as low as 10 microseconds.
[0]
https://golang.org/doc/go1.5#gc
[1]
https://golang.org/doc/go1.8#gc