https://github.com/ruby/sync
A module that provides a two-phase lock with a counter
https://github.com/ruby/sync
Keywords from Contributors
repl webrick bigdecimal debugger debugging-tool rubygems strscan documentation-tool parser-generator lalr-parser-generator
Last synced: about 2 hours ago
JSON representation
Repository metadata
A module that provides a two-phase lock with a counter
- Host: GitHub
- URL: https://github.com/ruby/sync
- Owner: ruby
- License: other
- Created: 2018-06-23T04:56:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-11-25T02:49:28.000Z (3 months ago)
- Last Synced: 2026-02-06T17:20:44.425Z (25 days ago)
- Language: Ruby
- Homepage:
- Size: 68.4 KB
- Stars: 8
- Watchers: 30
- Forks: 4
- Open Issues: 0
- Releases: 1
-
Metadata Files:
- Readme: README.md
- License: COPYING
README.md
Sync
A module that provides a two-phase lock with a counter.
Installation
Add this line to your application's Gemfile:
gem 'sync'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sync
Usage
Sync_m, Synchronizer_m
obj.extend(Sync_m)
or
class Foo
include Sync_m
end
Sync_m#sync_mode
Sync_m#sync_locked?, locked?
Sync_m#sync_shared?, shared?
Sync_m#sync_exclusive?, sync_exclusive?
Sync_m#sync_try_lock, try_lock
Sync_m#sync_lock, lock
Sync_m#sync_unlock, unlock
Sync, Synchronizer:
sync = Sync.new
Sync#mode
Sync#locked?
Sync#shared?
Sync#exclusive?
Sync#try_lock(mode) -- mode = :EX, :SH, :UN
Sync#lock(mode) -- mode = :EX, :SH, :UN
Sync#unlock
Sync#synchronize(mode) {...}
Development
After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/sync.
License
The gem is available as open source under the terms of the 2-Clause BSD License.
Owner metadata
- Name: The Ruby Programming Language
- Login: ruby
- Email: info@ruby-lang.org
- Kind: organization
- Description: Repositories related to the Ruby Programming language
- Website: https://www.ruby-lang.org/
- Location: Matsue, Japan
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/210414?v=4
- Repositories: 171
- Last ynced at: 2023-04-09T03:40:20.875Z
- Profile URL: https://github.com/ruby
GitHub Events
Total
- Delete event: 3
- Push event: 5
- Pull request event: 3
- Create event: 3
Last Year
- Delete event: 3
- Push event: 5
- Pull request event: 3
- Create event: 3
Committers metadata
Last synced: 1 day ago
Total Commits: 58
Total Committers: 19
Avg Commits per committer: 3.053
Development Distribution Score (DDS): 0.621
Commits in past year: 4
Committers in past year: 2
Avg Commits per committer in past year: 2.0
Development Distribution Score (DDS) in past year: 0.5
| Name | Commits | |
|---|---|---|
| SHIBATA Hiroshi | h****t@r****g | 22 |
| matz | m****z@b****e | 7 |
| nobu | n****u@b****e | 6 |
| dependabot[bot] | 4****] | 4 |
| kosaki | k****i@b****e | 3 |
| keiju | k****u@b****e | 2 |
| drbrain | d****n@b****e | 2 |
| akira | a****a@b****e | 1 |
| Olle Jonsson | o****n@g****m | 1 |
| Orhan Toy | t****n@g****m | 1 |
| Tim Meusel | t****m@b****e | 1 |
| akr | a****r@b****e | 1 |
| eregon | e****n@b****e | 1 |
| k0kubun | k****n@b****e | 1 |
| kazu | k****u@b****e | 1 |
| ko1 | k****1@b****e | 1 |
| ktsj | k****j@b****e | 1 |
| marcandre | m****e@b****e | 1 |
| naruse | n****e@b****e | 1 |
Committer domains:
- bastelfreak.de: 1
- ruby-lang.org: 1
Issue and Pull Request metadata
Last synced: 3 months ago
Total issues: 0
Total pull requests: 10
Average time to close issues: N/A
Average time to close pull requests: about 2 months
Total issue authors: 0
Total pull request authors: 5
Average comments per issue: 0
Average comments per pull request: 0.2
Merged pull request: 10
Bot issues: 0
Bot pull requests: 4
Past year issues: 0
Past year pull requests: 3
Past year average time to close issues: N/A
Past year average time to close pull requests: 3 days
Past year issue authors: 0
Past year pull request authors: 2
Past year average comments per issue: 0
Past year average comments per pull request: 0.33
Past year merged pull request: 3
Past year bot issues: 0
Past year bot pull requests: 2
Top Issue Authors
Top Pull Request Authors
- dependabot[bot] (4)
- hsbt (3)
- olleolleolle (1)
- bastelfreak (1)
- orhantoy (1)
Top Issue Labels
Top Pull Request Labels
- dependencies (4)
- github_actions (2)
Package metadata
- Total packages: 13
-
Total downloads:
- rubygems: 124,415,285 total
- Total docker downloads: 2,626,284,436
- Total dependent packages: 4 (may contain duplicates)
- Total dependent repositories: 2,204 (may contain duplicates)
- Total versions: 13
- Total maintainers: 2
gem.coop: sync
A module that provides a two-phase lock with a counter.
- Homepage: https://github.com/ruby/sync
- Documentation: http://www.rubydoc.info/gems/sync/
- Licenses: BSD-2-Clause
- Latest release: 0.5.0 (published about 7 years ago)
- Last Synced: 2026-03-02T18:02:54.956Z (1 day ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 62,219,440 Total
- Docker Downloads: 1,313,142,218
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Docker downloads count: 0.071%
- Average: 0.131%
- Downloads: 0.453%
- Maintainers (2)
guix: ruby-sync
Ruby module with a two-phase lock and counter
- Homepage: https://github.com/ruby/sync
- Documentation: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ruby-xyz.scm#n7863
- Licenses: bsd-2
- Latest release: 0.5.0 (published 1 day ago)
- Last Synced: 2026-03-02T18:59:10.546Z (1 day ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.555%
- Stargazers count: 1.11%
- Forks count: 1.11%
ubuntu-22.04: ruby-sync
- Homepage: https://github.com/ruby/sync
- Licenses: other
- Latest release: 0.5.0-2 (published 18 days ago)
- Last Synced: 2026-02-13T13:26:53.232Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 1.089%
- Stargazers count: 2.161%
- Forks count: 2.196%
rubygems.org: sync
A module that provides a two-phase lock with a counter.
- Homepage: https://github.com/ruby/sync
- Documentation: http://www.rubydoc.info/gems/sync/
- Licenses: BSD-2-Clause
- Latest release: 0.5.0 (published about 7 years ago)
- Last Synced: 2026-03-01T20:01:23.597Z (2 days ago)
- Versions: 1
- Dependent Packages: 4
- Dependent Repositories: 2,204
- Downloads: 62,195,845 Total
- Docker Downloads: 1,313,142,218
-
Rankings:
- Docker downloads count: 0.097%
- Downloads: 0.564%
- Dependent repos count: 0.671%
- Dependent packages count: 3.301%
- Average: 5.529%
- Forks count: 10.285%
- Stargazers count: 18.259%
- Maintainers (2)
proxy.golang.org: github.com/ruby/sync
- Homepage:
- Documentation: https://pkg.go.dev/github.com/ruby/sync#section-documentation
- Licenses: other
- Latest release: v0.5.0 (published about 7 years ago)
- Last Synced: 2026-03-01T20:01:24.077Z (2 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Forks count: 7.257%
- Dependent packages count: 9.576%
- Average: 9.685%
- Dependent repos count: 10.802%
- Stargazers count: 11.106%
debian-11: ruby-sync
- Homepage: https://github.com/ruby/sync
- Documentation: https://packages.debian.org/bullseye/ruby-sync
- Licenses:
- Latest release: 0.5.0-2 (published 21 days ago)
- Last Synced: 2026-02-13T08:25:33.796Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: ruby-sync
- Homepage: https://github.com/ruby/sync
- Documentation: https://packages.debian.org/bookworm/ruby-sync
- Licenses:
- Latest release: 0.5.0-2 (published 19 days ago)
- Last Synced: 2026-02-12T23:42:27.684Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-13: ruby-sync
- Homepage: https://github.com/ruby/sync
- Documentation: https://packages.debian.org/trixie/ruby-sync
- Licenses:
- Latest release: 0.5.0-2 (published 19 days ago)
- Last Synced: 2026-02-13T13:20:12.036Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- bundler >= 0 development
- rake >= 0 development
- test-unit >= 0 development
- actions/checkout v4 composite
- ruby/setup-ruby v1 composite
Score: 26.75900305530064