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
CheckIn 方法这样加锁,不是同时只有一个人可以签到了么,用户一多 同时签到的时候不是要排队签到影响并发了么
func (s *checkInService) CheckIn(userId int64) error { s.m.Lock() defer s.m.Unlock() .... }
The text was updated successfully, but these errors were encountered:
CheckIn 方法这样加锁,不是同时只有一个人可以签到了么,用户一多 同时签到的时候不是要排队签到影响并发了么 func (s *checkInService) CheckIn(userId int64) error { s.m.Lock() defer s.m.Unlock() .... }
是的, 你说的对,我知道这个问题存在,我当时写的时候没考虑这个问题,这个地方是可以优化的。
你代码看的很仔细
Sorry, something went wrong.
No branches or pull requests
CheckIn 方法这样加锁,不是同时只有一个人可以签到了么,用户一多 同时签到的时候不是要排队签到影响并发了么
The text was updated successfully, but these errors were encountered: