Commit Graph

11 Commits

Author SHA1 Message Date
Jose De La O 13a5cc4b99 adding copy feature and removing nested if/else 2018-09-03 02:52:33 -04:00
Jaime Pillora 06c7a16c84 validate float for integer overflow (closes #11) and add missing min-bound 2017-02-22 11:22:28 +11:00
Kevin Gillette 4dd47ae5ac Make ForAttempt concurrent-safe in all cases, golint. 2016-12-22 13:36:47 -07:00
Joshua Gentes ac9a0aaf07 Short-circuit the backoff algorithm. 2016-08-04 17:09:58 -04:00
Jaime Pillora 0496a6c14d add get currrent attempt method with test (closes #2) 2016-04-14 15:52:04 +10:00
Sean a63e4a8ca1 Add threadsafety notes
This is a comments-only change to note the threadsafety properties. It may be the case that ForAttempt is always threadsafe, but the Go race detector complains about the default setting on lines 44-52. And the workaround is quite easy.
2016-04-06 10:34:11 -07:00
Keegan Carruthers-Smith 741535fc02 Add ForAttempt
See documentation for motivation.
2016-03-01 17:31:41 +02:00
Daniel Wakefield 491389a93e Add Jitter to backoff.
Amazon recently wrote about performance gains of using jitter in
concurrent systems. http://www.awsarchitectureblog.com/2015/03/backoff.html

Seemed simple enough to add and wont change any code that may already be
using Backoff.
2015-03-06 14:42:27 +00:00
Jaime Pillora 041f4462d5 simplified further, added more tests 2015-03-04 02:44:54 +11:00
Jaime Pillora a6647af774 added more docs 2015-03-03 09:01:21 +11:00
Jaime Pillora 34204cc40b initial, tests passing 2015-02-28 17:21:18 +11:00