Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么接受数据使用channel接收数据缓存 #124

Closed
Jhon714-cooler opened this issue May 24, 2023 · 1 comment
Closed

为什么接受数据使用channel接收数据缓存 #124

Jhon714-cooler opened this issue May 24, 2023 · 1 comment

Comments

@Jhon714-cooler
Copy link

context 中上下文也可以保存数据,那为什么要使用channel

@link1st
Copy link
Owner

link1st commented May 25, 2023

go 关于协程使用的官方建议是,不要通过共享内存去通讯,要使用通讯的方式共享内存

这里使用 channel 就是通过通讯的方式共享内存。

@link1st link1st closed this as completed May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants