A summary of data about the Ruby ecosystem.

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

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


GitHub Events

Total
Last Year

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 Email 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:


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

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/ruby/sync

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

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%
ubuntu-24.04: ruby-sync

  • Homepage: https://github.com/ruby/sync
  • Licenses:
  • Latest release: 0.5.0-2 (published 19 days ago)
  • Last Synced: 2026-02-13T01:03:39.221Z (19 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-23.04: ruby-sync

  • Homepage: https://github.com/ruby/sync
  • Licenses:
  • Latest release: 0.5.0-2 (published 21 days ago)
  • Last Synced: 2026-02-11T06:50:45.294Z (21 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-20.04: ruby-sync

  • Homepage: https://github.com/ruby/sync
  • Licenses:
  • Latest release: 0.5.0-1 (published 19 days ago)
  • Last Synced: 2026-02-13T07:23:34.760Z (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-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%
ubuntu-23.10: ruby-sync

  • Homepage: https://github.com/ruby/sync
  • Licenses:
  • Latest release: 0.5.0-2 (published 18 days ago)
  • Last Synced: 2026-02-13T18:34:01.986Z (18 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Average: 100%
ubuntu-24.10: ruby-sync

  • Homepage: https://github.com/ruby/sync
  • Licenses:
  • Latest release: 0.5.0-2 (published 22 days ago)
  • Last Synced: 2026-02-09T17:22:54.657Z (22 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
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

sync.gemspec rubygems
  • bundler >= 0 development
  • rake >= 0 development
  • test-unit >= 0 development
.github/workflows/test.yml actions
  • actions/checkout v4 composite
  • ruby/setup-ruby v1 composite
Gemfile rubygems

Score: 26.75900305530064