Exponential backoff when 503 is returned #8

Merged
merged 1 commit into from Mar 4, 2012

Conversation

Projects
None yet
2 participants
Contributor

edsrzf commented Mar 4, 2012

Closes #7

Contributor

treeder commented Mar 4, 2012

Why did you have to copy the rand stuff into here?

@treeder treeder added a commit that referenced this pull request Mar 4, 2012

@treeder treeder Merge pull request #8 from iron-io/feature-backoff
Exponential backoff when 503 is returned
7306a6b

@treeder treeder merged commit 7306a6b into master Mar 4, 2012

Contributor

edsrzf commented Mar 4, 2012

I'm not thrilled about it, but the alternative is seeding and using the global random source (rand.Int63n and related functions). It's not very polite since the main application may want to seed it a different way and be the only consumer of random values. We also need to be thread safe.

I'm starting to think rand.lockedSource should be exported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment