-
写的那端阻塞我觉得没问题. 但是读的这端在读取的同时还需要做别的事情, 一直阻塞就卡住了. golang中可以用select, coost好像没找到相关接口. 难道是设置0 timeout? |
Beta Was this translation helpful? Give feedback.
Answered by
idealvin
Oct 31, 2024
Replies: 1 comment 1 reply
-
理论上是这样。不过channel性能很差,你自己随便用个队列,加锁,都比channel强 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ShirenY
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
理论上是这样。不过channel性能很差,你自己随便用个队列,加锁,都比channel强