1. Home
  2. Docs
  3. golang
  4. goroutine和channel

goroutine和channel

Q: 如何主动关闭gorutine?

不可以从外部主动关闭gorutine, 通常是gorutine执行完后自己关闭. 如果是被阻塞就无法自己关闭.

Q: 阻塞的情况有哪些?

  • 空的select语句将永远的阻塞
  • channel中没有被消费完也会阻塞gorutine

相关资料

goroutine-blog

Golang 的 goroutine 是如何实现的

调度器-goroutine

Go goroutine理解

相关资料

Channel

Channel 详解

Articles

Was this article helpful to you? Yes No

How can we help?