pipeline和channel的区别
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) |
事实上,这两个东西区别还是挺大的,但是用处都很明确,就是通信