I am pretty much sure the increment/decrement operations on integers are atomic, so using locks only to guard increment/decrement should not needed.
For the if-check-then-update makes sense, I will try to analyse better your report and see what would be a good solution from my point of view. Probably we can use an atomic variable for the counter field.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.