oscarwin / oscarwin.github.io

my blog, site: https://oscarwin.github.io/
0 stars 0 forks source link

GO并发编程简介 | oscarwin #2

Open oscarwin opened 4 years ago

oscarwin commented 4 years ago

https://oscarwin.github.io/2020/01/29/GO%E5%B9%B6%E5%8F%91%E7%BC%96%E7%A8%8B/

每当提起 go 的优点时,不得不提的一点是 go 支持原生协程。对于传统的 C 或者 Java 语言,需要通过线程来实现并发,然后通过互斥锁来实现线程同步。而 go 则通过协程(goroutines)来实现并发,通过通道(channels)来实现同步。go 语言这种并发模型被称为 CSP(Com-municating Sequential Processes)。

oscarwin commented 4 years ago

test