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

异步保存聊天信息 #125

Open
mikouhero opened this issue Sep 18, 2019 · 0 comments
Open

异步保存聊天信息 #125

mikouhero opened this issue Sep 18, 2019 · 0 comments

Comments

@mikouhero
Copy link

ChatMessage中使用了单例模式,由于swoole 是常驻进程,当ChatMessage实例化后,storage 属性会一直是同一个值,createStorage()这个方法就没有什么多大的意义了。在聊天室的demo 中,作者特别喜欢使用单例模式,个人觉得单例模式有优点也有缺点,不必用太多。。

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

1 participant