{"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":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-05T19:02:49Z","updated_at":"2015-04-06T02:09:18Z","closed_at":null,"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/89889902","html_url":"https://github.com/hamstergem/hamster/issues/167#issuecomment-89889902","issue_url":"https://api.github.com/repos/hamstergem/hamster/issues/167","id":89889902,"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-06T02:09:18Z","updated_at":"2015-04-06T02:09:18Z","body":"Another option is to have two implementations:\r\n\r\n1. If the `concurrent` gem is installed, use it (`require 'concurrent/atomics'` and use the `Atomic` class).\r\n2. Otherwise, build a naive (=slow) implementation using a Mutex for any read/write operation on @atomic (which can then be a normal fixnum).\r\n\r\nThis way hamster works out-of-the-box without other dependencies, and if you need List to be faster then you just `gem install concurrent`."}}