How is the scala concurrency model different from golang’s?
So as a language, Scala doesn’t impose a single concurrency model – it depends on the platform you’re running on, and to some degree the libraries you’re using…
Go’s memory model is based on communicating sequential processes (CSP) which was invented by Tony Hoar. It is described in detail here: PDF. There is a very good introduction into the problem domain by Robert Pike, the main creator of Go on Youtube: Concurrency Is Not Parallelism.
I won’t go into any further explanation of all that. I’m only going to drop the remark that CSP partly removes the inherent difficulty of asynchronous programming (at the expense of loosing preemptive threads due to the change to green threads). You can easily find tons of articles on the Internet about CSP, Go, Quasar, etc. To get some understanding beyond reading articles it is helpful to write some concurrent toy programs with Go.
Just in case you or anyone else is interested:
“JC has the same expressive power as CSP (Communicating Sequential Processes) and the Actor model, but is easier to use and reason about, more high-level and more declarative. (See also Conceptual overview of concurrency.)”