4 ms·
Go's concurrency model seems like a compromise: https://play.golang.org/p/DAoobz43yud https://play.golang.org/p/DAoobz43yud OR https://play.golang.org/p/m0Vn
by latch 6y ago
Go's concurrency model seems like a compromise:
https://play.golang.org/p/DAoobz43yud https://play.golang.org/p/DAoobz43yud
OR
https://play.golang.org/p/m0VntGBORBw https://play.golang.org/p/m0VntGBORBw
Also, I can't think of what scheduling capabilities Go's concurrency has?
- nkozyra 6y agoI'm not sure I understand your second example qualm. That's logical described-on-the-box behavior.
- latch 6y agoBecause the behavior is merely described, not enforced. It's relying on everyone to obey the two design rules that: 1) only the writing side should close the channel and 2) only one side should write. In this sense, it's as safe as mutexes: everything works as long as everyone (including any 3rd party library) does exactly what they're supposed to. When compared to what modern and robust concurrent programming looks like (e..g Erlang), it seems like a compromise to me