The documentation is correct. The current runtime.GC() implementation invokes a Stop The World (STW) GC that completes before runtime.GC() returns. It is useful when doing benchmarking to avoid some of the non-determinism caused by the GC.
On Tue, Nov 29, 2016 at 1:15 PM, Ian Lance Taylor <i...@golang.org> wrote: > [ +rlh, austin ] > > On Tue, Nov 29, 2016 at 7:29 AM, Carlos <uldericofi...@gmail.com> wrote: > > Hi, > > > > > > In https://golang.org/pkg/runtime/#GC it says: > > > >> It may also block the entire program. > > > > > > Is this still correct? I understand that GC still pauses, but being under > > 100us mark I wonder this affirmative still makes sense. > > > > All in all, if it does block, it will block no longer than 100us. > > > > > > > > - cc > > > > -- > > 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. > -- 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.