On Friday, July 7, 2017 at 4:04:21 AM UTC+8, Caleb Spare wrote:
>
> On Thu, Jul 6, 2017 at 12:41 PM,  <ken.kof...@gmail.com <javascript:>> 
> 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." 
>

"Library functions that used to trigger stop-the-world garbage collection 
now trigger concurrent garbage collection"

So, before 1.9, a garbage collection triggered by those library functions 
will stop all user goroutines until the collection is finished?
 

> > 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 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to