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
But it looks like the locking on onCancelWasCalled is wrong. The grouping on line 17 below the mutex on line 15 suggests that onCancelWasCalled is guarded by lock, but on line 50, it's assigned without holding the lock. (line 50 is in a goroutine, so the lock/defer Unlock on lines 35/36 don't affect it)
The text was updated successfully, but these errors were encountered:
The grouping on line 17 is a bit confusing. The mutex guards the initialization of onCancelWasCalled on line 42. But the assignment on line 50 and the read on line 68 are synchronized by unwatchChan.
Perhaps I'm mistaken and there is a race, but I think the tests cover all the orders Watch, Unwatch, and context cancellation could occur and I can't get the race detector to fail.
I got an automated PR telling us to update from pgconn 1.10.0 to 1.10.1 which gave us a helpful diff link:
v1.10.0...v1.10.1
But it looks like the locking on
onCancelWasCalled
is wrong. The grouping on line 17 below the mutex on line 15 suggests thatonCancelWasCalled
is guarded bylock
, but on line 50, it's assigned without holding the lock. (line 50 is in a goroutine, so the lock/defer Unlock on lines 35/36 don't affect it)The text was updated successfully, but these errors were encountered: