Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Make counter thread safe #61
Conversation
|
Nice! Thanks, I'll merge this. |
pushed a commit
that referenced
this pull request
Aug 20, 2015
dimitern
merged commit bff3a09
into
go-amz:v3
Aug 20, 2015
1 check passed
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
dooferlad
deleted the
dooferlad:fix-counter-race
branch
Aug 20, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dooferlad commentedAug 20, 2015
ect/ec2test/helper.go counter was not being used in a thread safe manner, so now it is a struct with next, get and reset functions. The old next function just incremented an integer and returned the old value. Now accessing by next, get and reset are all atomic.