简体   繁体   中英

Does golang has capbility to handle process and thread besides routine

I know that golang is using go routine implementing the concurrency. I assume go routine is lighter on weight than thread, one thread could have many routines. How does the golang manage threads and routines? Is golang always running a single thread like Node.js? Or Golang manages a lot of threads and creates more routines on these threads? Does golang providing some lib to touch the Process/Thread on OS level?

Go does manage a lot of threads and creates more routines on these threads. Go doesn't provide access to Process/Thread/Goroutine, them even haven't a names. Only channels in Go have names.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM