4 ms·
In one word: channels. They might be theoretically equivalent to some degree, but in practice they are quite different, and I find reasoning about both concurr
by luriel 14y ago
In one word: channels.
They might be theoretically equivalent to some degree, but in practice they are quite different, and I find reasoning about both concurrency and parallelism using goroutines and channels much more natural.
Also see this talk by Rob Pike on the origins of Go's concurrency model here: http://go-lang.cat-v.org/talks/ http://go-lang.cat-v.org/talks/
See also this article by Russ Cox about CSP: http://swtch.com/~rsc/thread/ http://swtch.com/~rsc/thread/
And Rob Pike's latest talk about concurrency patterns at Google IO last week: http://www.youtube.com/watch?v=f6kdp27TYZs http://www.youtube.com/watch?v=f6kdp27TYZs