pipeline和channel的區別
在golang中,學到channel時,往往都會產生一些疑惑,和channel的區別是什么?
以下就是區別:
| difference | channel | pipeline |
|---|---|---|
| structure | streams of a Go type | unstructured streams of bytes |
| platform | specific type in golang | unix Or unix like |
| buffer | Depending on the circumstances | always buffered |
| features | connected between goroutine | between two process(std.in/out) |
事實上,這兩個東西區別還是挺大的,但是用處都很明確,就是通信
