{"action":"created","issue":{"url":"https://api.github.com/repos/cenkalti/backoff/issues/21","labels_url":"https://api.github.com/repos/cenkalti/backoff/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/cenkalti/backoff/issues/21/comments","events_url":"https://api.github.com/repos/cenkalti/backoff/issues/21/events","html_url":"https://github.com/cenkalti/backoff/issues/21","id":118524041,"number":21,"title":"ExponentialBackoff thread safety","user":{"login":"talbright","id":212177,"avatar_url":"https://avatars.githubusercontent.com/u/212177?v=3","gravatar_id":"","url":"https://api.github.com/users/talbright","html_url":"https://github.com/talbright","followers_url":"https://api.github.com/users/talbright/followers","following_url":"https://api.github.com/users/talbright/following{/other_user}","gists_url":"https://api.github.com/users/talbright/gists{/gist_id}","starred_url":"https://api.github.com/users/talbright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talbright/subscriptions","organizations_url":"https://api.github.com/users/talbright/orgs","repos_url":"https://api.github.com/users/talbright/repos","events_url":"https://api.github.com/users/talbright/events{/privacy}","received_events_url":"https://api.github.com/users/talbright/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-24T03:21:34Z","updated_at":"2015-11-26T22:34:09Z","closed_at":"2015-11-26T22:34:09Z","body":"What makes this type not thread-safe? \r\n\r\nhttps://github.com/cenkalti/backoff/blob/master/exponential.go#L52\r\n\r\nOnly thing I can see is a possible issue here https://github.com/cenkalti/backoff/blob/master/exponential.go#L103.\r\n"},"comment":{"url":"https://api.github.com/repos/cenkalti/backoff/issues/comments/160000364","html_url":"https://github.com/cenkalti/backoff/issues/21#issuecomment-160000364","issue_url":"https://api.github.com/repos/cenkalti/backoff/issues/21","id":160000364,"user":{"login":"cenkalti","id":661618,"avatar_url":"https://avatars.githubusercontent.com/u/661618?v=3","gravatar_id":"","url":"https://api.github.com/users/cenkalti","html_url":"https://github.com/cenkalti","followers_url":"https://api.github.com/users/cenkalti/followers","following_url":"https://api.github.com/users/cenkalti/following{/other_user}","gists_url":"https://api.github.com/users/cenkalti/gists{/gist_id}","starred_url":"https://api.github.com/users/cenkalti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cenkalti/subscriptions","organizations_url":"https://api.github.com/users/cenkalti/orgs","repos_url":"https://api.github.com/users/cenkalti/repos","events_url":"https://api.github.com/users/cenkalti/events{/privacy}","received_events_url":"https://api.github.com/users/cenkalti/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T22:34:09Z","updated_at":"2015-11-26T22:34:09Z","body":"There is a race condition when ```NextBackOff()``` is called from multiple threads. ```currentInterval``` field is not protected from reading/writing from different threads."}}