gogc

多開 Goroutine 的效能瓶頸以及 Garbage Collection 對其的影響

category: random     9 minute read     Posted on:

Preface Goroutine 作為 Golang 的一大特色 其輕量且快速的特性,使得其的開銷相比 process 以及 thread 要來的低上許多 因此人們往往會將 Goroutine 用在非同步的操作上,比如說 I/O 或者是 CPU-bound 的操作 用以達到併發的效果