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

mmo里的锁安全问题 #22

Closed
15951836388 opened this issue Jul 30, 2019 · 0 comments
Closed

mmo里的锁安全问题 #22

15951836388 opened this issue Jul 30, 2019 · 0 comments

Comments

@15951836388
Copy link

mmo里getplayer是读锁。
image
里面取出player就直接修改player 的数据,难道不会有并发写的问题吗?

还有玩家交互的需求,比如交易,pk扣血,要同时改变多个player的数据,不能用只读锁吧?

还有AOIManager 里的grids map[int]*Grid的相关操作,也没有加锁

这些感觉都会出并发锁的问题啊,压力测试里,难道没有出现吗?希望作者能大概说说这里面的处理

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