3 ms·
Go's channels aren't a concurrency primitive, they are a concurrency abstraction. Goroutines are the primitive. I also don't think it would be hard to implement
by rubiquity 12y ago
Go's channels aren't a concurrency primitive, they are a concurrency abstraction. Goroutines are the primitive. I also don't think it would be hard to implement Go channel semantics in Python.
- kreshikhin 12y agoIn my opinion the difference between abstraction and primitives lies in fact that abstraction cannot be instantiated. Channels can be instantiated, goroutines cannot. Correct me if I'm wrong please.
- rubiquity 12y agoYour definition seems to have its roots tightly coupled to abstraction vs primitive in the sense of Object-oriented programming. Your use of the word "instantiation" makes me feel that way. Let me know if that is misguided. In the world of concurrency you could probably even call goroutines an abstraction but goroutines are at least closer to the fundamental concurrency primitives such as threads, locks, mutexes and tasks/coroutines/whatever.