We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
deercoder-chat/api/controllers/chat/chatWs 中的第20行 clinets 使用 []clent 这样做是否线程安全? 是否使用sync.Map 会更好一些
The text was updated successfully, but these errors were encountered:
安全, 因为没有并发写的情况 本质上是用的就是数组来模拟记录所有连接client, 各自启动一个新的线程来独立监听, 根据id标记客户端,没有线程交叉写的情况
Sorry, something went wrong.
No branches or pull requests
deercoder-chat/api/controllers/chat/chatWs 中的第20行 clinets 使用 []clent
这样做是否线程安全? 是否使用sync.Map 会更好一些
The text was updated successfully, but these errors were encountered: