Re:Show HN: Chan – pure C implementation of Go channels
by chc on Friday August 29, 2014 @08:36PM
(#8245165)
Channels are useful because they allow for easy synchronous communication between threads of execution. Whether the threads of execution are dedicated POSIX threads or drawn from a thread pool or simulated by an event-driven state machine (as in ClojureScript) is a different consideration.
Re:Show HN: Chan – pure C implementation of Go channels
by tylertreat on Friday August 29, 2014 @08:24PM
(#8245132)
I believe you're confusing goroutines with channels. Goroutines are lightweight threads of execution. Channels are the pipes that connect goroutines.
Although, as far as I recall Go does map a bundle of them to a thread and can thus handle parallelism as well.
Just to clarify, this is not a complaint, I am trying to get a better idea of these abstractions.
@tylertreat
> I believe you're confusing goroutines with channels. Goroutines are lightweight threads of execution. Channels are the pipes that connect goroutines.
That is indeed correct. I was thinking more in the line of fibres that meld the concepts of a coroutine and a channel into a single abstraction. So the idea is Chan connects threads rather than coroutines.