Analysis updated 2026-07-11 · repo last pushed 2018-05-10
Safely increment a shared counter across multiple worker threads without losing updates.
Build a background job processor where multiple threads update shared state concurrently.
Migrate an older Ruby codebase from this gem to the concurrent-ruby library.
Handle concurrent value updates in a multi-threaded web server without race conditions.
| ruby-concurrency/atomic | dawarich-app/atlas | fastlane/monorepo | |
|---|---|---|---|
| Stars | 25 | 21 | 29 |
| Language | Ruby | Ruby | Ruby |
| Last pushed | 2018-05-10 | — | 2018-07-16 |
| Maintenance | Dormant | — | Dormant |
| Setup difficulty | easy | hard | moderate |
| Complexity | 2/5 | 4/5 | 3/5 |
| Audience | developer | ops devops | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Deprecated gem, users should migrate to concurrent-ruby instead, but existing usage works via standard gem install.
Ruby Atomic is a library that helps Ruby programs safely update shared values when multiple parts of the program are running at the same time. The core idea is something called an "atomic reference," which acts like a container for a value that can be updated safely even when multiple threads try to change it simultaneously. In plain terms, when two threads try to update the same variable at the same time, you can get race conditions where the final value is unpredictable. An atomic reference solves this by providing methods like "update," which retries the operation if another thread changed the value in the meantime, and "try_update," which raises an error instead so your code can decide what to do. There are also simpler operations like "compare_and_swap," which only updates the value if it still matches what you expected. This is useful for developers building multi-threaded Ruby applications, such as background job processors or web servers handling concurrent requests. For example, if multiple worker threads are incrementing a shared counter, an atomic reference ensures no increments are lost to race conditions. The project is now deprecated. All of its code has been merged into a larger project called concurrent-ruby, and users are encouraged to switch to that instead. The original repository remains available but will not receive updates for new Ruby versions. If you are maintaining an older codebase that still uses this gem, the migration path is straightforward, primarily involving changing how you name the atomic class in your code.
A Ruby library for safely updating shared values across multiple threads using atomic references. It is now deprecated and merged into the concurrent-ruby project.
Mainly Ruby. The stack also includes Ruby.
Dormant — no commits in 2+ years (last push 2018-05-10).
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.