On Fri, Jul 9, 2021 at 7:05 AM Kavindu Gimhan Zoysa
<
kavin...@gmail.com> wrote:
>
> Thank you Than, Is go scheduler is responsible for running GC?
Go uses a concurrent garbage collector. There are GC worker
goroutines that work in parallel with the rest of the program. There
are also cases where an ordinary program goroutine will do some work
at memory allocation time to help the GC. For the basic framework see
https://golang.org/s/go14gc, although the GC has advanced a great deal
since then.
So: is the Go scheduler responsible for running GC? Sort of, in the
sense that the GC runs in goroutines that are managed by the Go
scheduler, but not really, in that the scheduler and the GC are
relatively independent parts of the runtime.
Ian
> To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/3e8ac852-0653-4602-b6db-df06f0713101n%40googlegroups.com.