Make counter thread safe #61

Merged
merged 1 commit into from Aug 20, 2015

Conversation

Projects
None yet
2 participants

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.

ect/ec2test/helper.go counter was not being used in a thread safe man…
…ner, 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.
Member

dimitern commented Aug 20, 2015

Nice! Thanks, I'll merge this.

dimitern pushed a commit that referenced this pull request Aug 20, 2015

@dimitern 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 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