{"action":"created","issue":{"url":"https://api.github.com/repos/Workiva/go-datastructures/issues/59","labels_url":"https://api.github.com/repos/Workiva/go-datastructures/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/Workiva/go-datastructures/issues/59/comments","events_url":"https://api.github.com/repos/Workiva/go-datastructures/issues/59/events","html_url":"https://github.com/Workiva/go-datastructures/pull/59","id":57211679,"number":59,"title":"Ring buffer","user":{"login":"dustinhiatt-wf","id":1457662,"avatar_url":"https://avatars.githubusercontent.com/u/1457662?v=3","gravatar_id":"","url":"https://api.github.com/users/dustinhiatt-wf","html_url":"https://github.com/dustinhiatt-wf","followers_url":"https://api.github.com/users/dustinhiatt-wf/followers","following_url":"https://api.github.com/users/dustinhiatt-wf/following{/other_user}","gists_url":"https://api.github.com/users/dustinhiatt-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/dustinhiatt-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustinhiatt-wf/subscriptions","organizations_url":"https://api.github.com/users/dustinhiatt-wf/orgs","repos_url":"https://api.github.com/users/dustinhiatt-wf/repos","events_url":"https://api.github.com/users/dustinhiatt-wf/events{/privacy}","received_events_url":"https://api.github.com/users/dustinhiatt-wf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-10T18:02:46Z","updated_at":"2015-02-10T18:08:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Workiva/go-datastructures/pulls/59","html_url":"https://github.com/Workiva/go-datastructures/pull/59","diff_url":"https://github.com/Workiva/go-datastructures/pull/59.diff","patch_url":"https://github.com/Workiva/go-datastructures/pull/59.patch"},"body":"CODE REVIEW\r\n\r\nWe have buffers in our codebase that are protected with locks and waitgroups for blocking.  We need a faster buffer and this is that.  This is an MPMC threadsafe ring buffer where threadsafety is achieved using only CAS operations.  Makes this buffer pretty fast, and the fixed size ensures bounded sorts of behavior.  Calling dispose on this buffer will free any blocked threads with an error returned (unlike panicking with channels). \r\n\r\nI'm hoping to use this to speed up the PALM tree. \r\n\r\nBenchmarkRBLifeCycle-8\t10000000\t       177 ns/op // involves simultaneous put/get of b.N items\r\nBenchmarkRBPut-8\t30000000\t        58.1 ns/op\r\nBenchmarkRBGet-8\t50000000\t        26.8 ns/op\r\n\r\n@alexandercampbell-wf @beaulyddon-wf @tannermiller-wf @rosshendrickson-wf @tylertreat-wf @ericolson-wf @stevenosborne-wf "},"comment":{"url":"https://api.github.com/repos/Workiva/go-datastructures/issues/comments/73750517","html_url":"https://github.com/Workiva/go-datastructures/pull/59#issuecomment-73750517","issue_url":"https://api.github.com/repos/Workiva/go-datastructures/issues/59","id":73750517,"user":{"login":"tannermiller-wf","id":1943440,"avatar_url":"https://avatars.githubusercontent.com/u/1943440?v=3","gravatar_id":"","url":"https://api.github.com/users/tannermiller-wf","html_url":"https://github.com/tannermiller-wf","followers_url":"https://api.github.com/users/tannermiller-wf/followers","following_url":"https://api.github.com/users/tannermiller-wf/following{/other_user}","gists_url":"https://api.github.com/users/tannermiller-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/tannermiller-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tannermiller-wf/subscriptions","organizations_url":"https://api.github.com/users/tannermiller-wf/orgs","repos_url":"https://api.github.com/users/tannermiller-wf/repos","events_url":"https://api.github.com/users/tannermiller-wf/events{/privacy}","received_events_url":"https://api.github.com/users/tannermiller-wf/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T18:08:01Z","updated_at":"2015-02-10T18:08:01Z","body":"+1 lockless datastructures are very cool"}}