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
Put(conn interface{}) 这方法里
c.mu.Lock()后为什么不直接 defer c.mu.Unlock()
而是各个select 分支上再 c.mu.Unlock() 有什么特殊的考虑吗?
The text was updated successfully, but these errors were encountered:
因为c.Close里面也有lock,如果这里直接defer会造成死锁
Sorry, something went wrong.
No branches or pull requests
Put(conn interface{}) 这方法里
c.mu.Lock()后为什么不直接
defer c.mu.Unlock()
而是各个select 分支上再 c.mu.Unlock()
有什么特殊的考虑吗?
The text was updated successfully, but these errors were encountered: