dua6992 2016-01-05 14:21
浏览 83

golang除了例程外还具有处理进程和线程的能力吗

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?

  • 写回答

1条回答 默认 最新

  • dousao9569 2016-01-05 19:57
    关注

    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.

    评论

报告相同问题?