You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defer b.lock.Unlock()
Put the current statement inside a for loop.like for ...{ .... if if b.lock.TryLock() { defer b.lock.Unlock() ... } }
What did you see happen?
Put the current statement inside a for loop so that the lock is released without exiting the function.
The same statement behaves as not releasing the lock on both Windows and other Linux.
What did you expect to see?
Does not release the lock.
The text was updated successfully, but these errors were encountered:
it seems to me you are most likely misusing locks.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
Go version
go version go1.21.4 linux/arm64
Output of
go env
in your module/workspace:What did you do?
defer b.lock.Unlock()
Put the current statement inside a for loop.like
for ...{ .... if if b.lock.TryLock() { defer b.lock.Unlock() ... } }
What did you see happen?
Put the current statement inside a for loop so that the lock is released without exiting the function.
The same statement behaves as not releasing the lock on both Windows and other Linux.
What did you expect to see?
Does not release the lock.
The text was updated successfully, but these errors were encountered: