{"action":"created","issue":{"url":"https://api.github.com/repos/hamstergem/hamster/issues/167","labels_url":"https://api.github.com/repos/hamstergem/hamster/issues/167/labels{/name}","comments_url":"https://api.github.com/repos/hamstergem/hamster/issues/167/comments","events_url":"https://api.github.com/repos/hamstergem/hamster/issues/167/events","html_url":"https://github.com/hamstergem/hamster/issues/167","id":66471173,"number":167,"title":"'atomic' gem is deprecated; use 'concurrent-ruby' instead","user":{"login":"roryokane","id":79168,"avatar_url":"https://avatars.githubusercontent.com/u/79168?v=3","gravatar_id":"","url":"https://api.github.com/users/roryokane","html_url":"https://github.com/roryokane","followers_url":"https://api.github.com/users/roryokane/followers","following_url":"https://api.github.com/users/roryokane/following{/other_user}","gists_url":"https://api.github.com/users/roryokane/gists{/gist_id}","starred_url":"https://api.github.com/users/roryokane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roryokane/subscriptions","organizations_url":"https://api.github.com/users/roryokane/orgs","repos_url":"https://api.github.com/users/roryokane/repos","events_url":"https://api.github.com/users/roryokane/events{/privacy}","received_events_url":"https://api.github.com/users/roryokane/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-04-05T19:02:49Z","updated_at":"2015-04-07T15:27:09Z","closed_at":"2015-04-07T05:57:26Z","body":"I notice that [`hamster.gemspec` includes the `atomic` gem](https://github.com/hamstergem/hamster/blob/e32a799ca14223a99c47488822defdb5a189f1af/hamster.gemspec#L24):\r\n\r\n```ruby\r\nspec.add_runtime_dependency     \"atomic\", \"~> 1.1\"\r\n```\r\n\r\nThe [`atomic` gem](https://rubygems.org/gems/atomic/) repository seems to be [github.com/ruby-concurrency/atomic](https://github.com/ruby-concurrency/atomic). Their README has this message:\r\n\r\n> This gem has been deprecated in lieu of [Concurrent Ruby](http://www.concurrent-ruby.com/). This gem will be retained in GitHub and Rubygems.org indefinitely but no new development will occur, including updates to support new versions of Ruby, JRuby, and Java. All users of this gem are encouraged to update their projects to use `concurrent-ruby` instead.\r\n\r\nSo you may want to update your use of `atomic` to avoid potential incompatibilities with future Ruby versions.\r\n\r\n[`atomic`’s README](https://github.com/ruby-concurrency/atomic#deprecated) shows that at least in some cases, it is as simple as renaming your use of `atomic` and `Atomic`:\r\n\r\n> ```ruby\r\n> # old way\r\n> require 'atomic'\r\n> my_atomic = Atomic.new(0)\r\n> \r\n> # new way\r\n> require 'concurrent'\r\n> my_atomic = Concurrent::Atomic.new(0)\r\n> ```"},"comment":{"url":"https://api.github.com/repos/hamstergem/hamster/issues/comments/90610146","html_url":"https://github.com/hamstergem/hamster/issues/167#issuecomment-90610146","issue_url":"https://api.github.com/repos/hamstergem/hamster/issues/167","id":90610146,"user":{"login":"dubek","id":9211,"avatar_url":"https://avatars.githubusercontent.com/u/9211?v=3","gravatar_id":"","url":"https://api.github.com/users/dubek","html_url":"https://github.com/dubek","followers_url":"https://api.github.com/users/dubek/followers","following_url":"https://api.github.com/users/dubek/following{/other_user}","gists_url":"https://api.github.com/users/dubek/gists{/gist_id}","starred_url":"https://api.github.com/users/dubek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dubek/subscriptions","organizations_url":"https://api.github.com/users/dubek/orgs","repos_url":"https://api.github.com/users/dubek/repos","events_url":"https://api.github.com/users/dubek/events{/privacy}","received_events_url":"https://api.github.com/users/dubek/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T15:27:09Z","updated_at":"2015-04-07T15:27:09Z","body":"Nice.\r\n\r\nBTW (not related to the concurrent gem): it might be clearer to extract those `if @atomic.get != 2` to something like:\r\n\r\n```ruby\r\ndef head\r\n  realize unless realized?\r\n  @head\r\nend\r\n\r\nprivate\r\n\r\ndef realized?\r\n  @atomic.get == 2\r\nend\r\n```\r\n\r\nand so on for the other \"states\" of the `@atomic` var.\r\n\r\nI might pursue it in a separate PR for review."}}