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
您好,在看这篇《Go语言如何实现可重入锁?》文章时,提供的代码: func NewReentrantLock() sync.Locker{ res := &ReentrantLock{ lock: new(sync.Mutex), recursion: 0, host: 0, } res.cond = sync.NewCond(res.lock) return res }
func NewReentrantLock() sync.Locker{ res := &ReentrantLock{ lock: new(sync.Mutex), recursion: 0, host: 0, } res.cond = sync.NewCond(res.lock) return res }
这里返回值res是*ReentrantLock类型,会报错?
The text was updated successfully, but these errors were encountered:
报的什么错?
Sorry, something went wrong.
No branches or pull requests
您好,在看这篇《Go语言如何实现可重入锁?》文章时,提供的代码:
func NewReentrantLock() sync.Locker{ res := &ReentrantLock{ lock: new(sync.Mutex), recursion: 0, host: 0, } res.cond = sync.NewCond(res.lock) return res }
这里返回值res是*ReentrantLock类型,会报错?
The text was updated successfully, but these errors were encountered: